Skip to content

Commit a01aa45

Browse files
authored
[REL-11803] removing the php and javascript targets (#294)
removing the php and javascript targets
1 parent 7eab99a commit a01aa45

23 files changed

Lines changed: 5 additions & 4338 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,6 @@ jobs:
8585
run: |
8686
cd samples/go
8787
make
88-
test-javascript:
89-
runs-on: ubuntu-latest
90-
needs: build
91-
steps:
92-
- uses: actions/checkout@v4
93-
- name: Download targets
94-
uses: actions/download-artifact@v4
95-
with:
96-
name: targets
97-
path: targets
98-
- uses: actions/setup-node@v4
99-
with:
100-
node-version: '20'
101-
- name: Build JS client
102-
working-directory: targets/api-client-javascript
103-
run: |
104-
rm -rf node_modules dist
105-
npm install
106-
npx --yes babel src -d dist --plugins @babel/plugin-transform-modules-commonjs
107-
# TODO: Fix this test
108-
# - name: Run JS sample
109-
# run: |
110-
# cd samples/javascript
111-
# # Install the local package directly
112-
# npm install
113-
# node index.js
11488
test-python:
11589
runs-on: ubuntu-latest
11690
needs: build
@@ -212,37 +186,16 @@ jobs:
212186
npm install
213187
npm run build
214188
npm start
215-
test-php:
216-
runs-on: ubuntu-latest
217-
needs: build
218-
steps:
219-
- uses: actions/checkout@v4
220-
- name: Download targets
221-
uses: actions/download-artifact@v4
222-
with:
223-
name: targets
224-
path: targets
225-
- uses: shivammathur/setup-php@v2
226-
with:
227-
php-version: '8.1'
228-
- name: Run PHP sample
229-
working-directory: samples/php
230-
run: |
231-
echo '{"require":{"launchdarkly/api-client-php":"@dev","guzzlehttp/guzzle":"*"},"repositories":[{"type":"path","url":"../../targets/api-client-php","options":{"symlink":true}}]}' > composer.json
232-
composer update
233-
php index.php
234189
235190
check-success:
236191
name: Check Success
237192
needs:
238193
- build
239194
- test-go
240-
- test-javascript
241195
- test-python
242196
- test-ruby
243197
- test-java
244198
- test-typescript
245-
- test-php
246199
if: always()
247200
runs-on: ubuntu-latest
248201
steps:

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
java -XX:+PrintFlagsFinal -version | grep ThreadStackSize
6060
make
6161
# Verify that the generated client code can be built
62-
make BUILD_TARGETS="go java javascript python ruby typescript-axios" build_clients
62+
make BUILD_TARGETS="go java python ruby typescript-axios" build_clients
6363
# This step will:
6464
# * Push built clients to their respective Github repos
6565
# * Tag those commits with the release version
@@ -77,7 +77,7 @@ jobs:
7777
needs: release
7878
strategy:
7979
matrix:
80-
repo: ['api-client-go', 'api-client-java', 'api-client-javascript', 'api-client-php', 'api-client-python', 'api-client-ruby', 'api-client-typescript']
80+
repo: ['api-client-go', 'api-client-java', 'api-client-python', 'api-client-ruby', 'api-client-typescript']
8181
steps:
8282
- uses: ncipollo/release-action@v1.14.0
8383
with:

.ldrelease/build.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

.ldrelease/config.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.ldrelease/prepare.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

.ldrelease/publish-dry-run.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

.ldrelease/publish.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

.ldrelease/secrets.properties

Lines changed: 0 additions & 17 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ LATEST_API_VERSION=20240415 # the API version (for the LD-API-Version header val
1919
API_TARGETS ?= \
2020
go \
2121
java \
22-
javascript \
23-
php \
2422
python \
2523
ruby \
2624
typescript-axios
@@ -81,19 +79,6 @@ CODEGEN_PARAMS_java = \
8179
--additional-properties=scmDeveloperConnection='scm:git:ssh:git@github.com:launchdarkly/api-client-java.git' \
8280
--additional-properties=gradleProperties=systemProp.org.gradle.internal.http.connectionTimeout=300000$$'\n'systemProp.org.gradle.internal.http.socketTimeout=300000$$'\n'org.gradle.jvmargs=-Xss2m \
8381
--additional-properties=launchDarklyApiVersion=${LATEST_API_VERSION}
84-
CODEGEN_PARAMS_javascript = \
85-
-t $(TEMPLATES_PATH)/javascript \
86-
--additional-properties=projectName=launchdarkly-api \
87-
--additional-properties=projectVersion=$(TAG) \
88-
--additional-properties=projectDescription="Build custom integrations with the LaunchDarkly REST API" \
89-
--additional-properties=moduleName=LaunchDarklyApi
90-
CODEGEN_PARAMS_php = \
91-
--additional-properties=packagePath=LaunchDarklyApi \
92-
--additional-properties=composerVendorName=launchdarkly \
93-
--additional-properties=composerProjectName=api-client-php \
94-
--additional-properties=invokerPackage=LaunchDarklyApi \
95-
--git-user-id=launchdarkly \
96-
--git-repo-id=api-client-php
9782
CODEGEN_PARAMS_python = \
9883
-t $(TEMPLATES_PATH)/python \
9984
--additional-properties=packageName=launchdarkly_api \
@@ -114,13 +99,11 @@ CODEGEN_PARAMS_ruby = \
11499
--additional-properties=launchDarklyApiVersion=${LATEST_API_VERSION}
115100

116101
SAMPLE_FILE_go = main.go
117-
SAMPLE_FILE_javascript = index.js
118102
SAMPLE_FILE_python = main.py
119103
SAMPLE_FILE_ruby = main.rb
120104
SAMPLE_FILE_typescript-axios = index.ts
121105

122106
SAMPLE_FORMAT_go = go
123-
SAMPLE_FORMAT_javascript = js
124107
SAMPLE_FORMAT_python = python
125108
SAMPLE_FORMAT_ruby = ruby
126109
SAMPLE_FORMAT_typescript-axios = ts

README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,4 @@ Server/client code for the API can be automatically generated. To generate the c
1616

1717
## How releases work
1818

19-
This project is set up (via the files in `.ldrelease`) to work with LaunchDarkly's internal Releaser tool. Running a release via Releaser will execute the required `make` targets in the right order, sandboxed in a Docker container that contains all the necessary build tools. You can also do a "dry run" in Releaser, which does all of the _build_ steps and provides you with the build products, but does not push anything to GitHub or to package managers.
20-
21-
That is the preferred way of doing releases, but the `make` targets can also be run locally if necessary, as long as your local environment has all of the necessary tools installed (as defined by the Docker image selected in `.ldrelease/config.yml` and anything else that's installed in `.ldrelease/prepare.sh`). Here are more details about what they do:
22-
23-
* `make load_prior_targets`: Sets up the source repos for each client repository (such as `api-client-go`) as git submodules of the `targets` directory.
24-
* `make all`: Generates the API spec, runs the OpenAPI code generator to create the code for each API client, and copies the generated code into the submodules in `targets`.
25-
* `make build_clients`: Verifies that the generated code for each client can actually be built as a package. This runs the script for each client that is in `scripts/build`.
26-
* `make push`: Pushes the changes in the submodules to the client repositories.
27-
* `make push_dry_run`: Simulates what the result of `make push` would be.
28-
* `make publish`: Pushes the client code to package managers, for platforms where this is applicable (such as NPM for the JavaScript clients). This runs the script for each client that is in `scripts/release`, if any.
29-
* `make publish_dry_run`: Simulates what the result of `make publish` would be.This runs the script for each client that is in `scripts/build`, if any.
30-
31-
Or, if you just want to look at the generated code locally, run `make targets_docker` which is equivalent to `make all` but uses a Docker container, so that the only tool you need to have installed locally is Docker. The output will appear in `./targets`. This is a convenient way to validate any local changes that relate to code generation. If you are also making changes that affect how the client code is packaged or published, it is better to use the slower but more comprehensive method of a Releaser dry run.
32-
33-
When running any `make` targets locally, set the environment variable `$LD_RELEASE_VERSION` to the version you are releasing, such as "6.0.0". It is set automatically when releases are run through Releaser.
19+
This project is set up to use [Github Actions](https://github.com/launchdarkly/ld-openapi-private/actions/workflows/release.yml) to release new versions.

0 commit comments

Comments
 (0)