diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index c92873f9..9a3fb634 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -53,13 +53,29 @@ jobs: - name: Update config files with new version id: updateVersion run: | - yq -i '.npmVersion = "${{ github.event.inputs.version }}"' config.yaml + yq -i '.npmVersion = "${{ github.event.inputs.version }}"' sdk-resources/plexjs-config.yaml + yq -i '.npmVersion = "${{ github.event.inputs.version }}"' sdk-resources/plextv-config.yaml + + ## Update package.json file with new version + - name: Update package.json version + id: updatePackageJsonVersion + if: steps.updateVersion.outcome == 'success' + run: | + LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) + cd plexjs + jq '.version = "${{ github.event.inputs.version }}"' package.json > package.json.tmp && mv package.json.tmp package.json - name: Build TS SDK id: buildTS run: | - rm -rf plexjs/ - java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o plexjs/ --global-property skipFormModel=false --config config.yaml + rm -rf plexjs/pms + java -jar openapi-generator-cli.jar generate -i api-specs/pms/pms-spec.yaml -g typescript-axios -o plexjs/pms --global-property skipFormModel=false --config sdk-resources/pms-config.yaml + + - name: Build TS SDK + id: buildTS + run: | + rm -rf plexjs/plextv + java -jar openapi-generator-cli.jar generate -i api-specs/plextv/plextv-spec.yaml -g typescript-axios -o plexjs/plextv --global-property skipFormModel=false --config sdk-resources/plextv-config.yaml - name: After SDK Build id: buildSDK diff --git a/plexjs/index.ts b/plexjs/index.ts index e435a098..748809d8 100644 --- a/plexjs/index.ts +++ b/plexjs/index.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - -export * from "./api"; -export {Configuration, ConfigurationParameters} from "./configuration"; - +export * from "./plextv/api"; +export * from "./pms/api"; +export { Configuration, ConfigurationParameters } from "./configuration"; diff --git a/sdk-resources/plexjs-config.yaml b/sdk-resources/pms-config.yaml similarity index 100% rename from sdk-resources/plexjs-config.yaml rename to sdk-resources/pms-config.yaml