Merge pull request #4271 from joshuaboniface/fix-ci-script
Improve handling of apiclient generatorpull/4264/head
commit
fe9d25c268
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
artifactsDirectory="${1}"
|
||||
buildNumber="${2}"
|
||||
if [[ -n ${buildNumber} ]]; then
|
||||
# Unstable build
|
||||
additionalProperties=",snapshotVersion=\"-SNAPSHOT.${buildNumber}\",npmRepository=\"https://pkgs.dev.azure.com/jellyfin-project/jellyfin/_packaging/unstable/npm/registry/\""
|
||||
else
|
||||
# Stable build
|
||||
additionalProperties=""
|
||||
fi
|
||||
|
||||
java -jar openapi-generator-cli.jar generate \
|
||||
--input-spec ${artifactsDirectory}/openapispec/openapi.json \
|
||||
--generator-name typescript-axios \
|
||||
--output ./apiclient/generated/typescript/axios \
|
||||
--template-dir ./apiclient/templates/typescript/axios \
|
||||
--ignore-file-override ./apiclient/.openapi-generator-ignore \
|
||||
--additional-properties=useSingleRequestParameter="true",withSeparateModelsAndApi="true",npmName="axios"${additionalProperties}
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
java -jar openapi-generator-cli.jar generate \
|
||||
--input-spec $(System.ArtifactsDirectory)/openapispec/openapi.json \
|
||||
--generator-name typescript-axios \
|
||||
--output ./apiclient/generated/typescript/axios \
|
||||
--template-dir ./apiclient/templates/typescript/axios \
|
||||
--ignore-file-override ./apiclient/.openapi-generator-ignore \
|
||||
--additional-properties=useSingleRequestParameter="true",withSeparateModelsAndApi="true",npmName="axios"
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
java -jar openapi-generator-cli.jar generate \
|
||||
--input-spec $(System.ArtifactsDirectory)/openapispec/openapi.json \
|
||||
--generator-name typescript-axios \
|
||||
--output ./apiclient/generated/typescript/axios \
|
||||
--template-dir ./apiclient/templates/typescript/axios \
|
||||
--ignore-file-override ./apiclient/.openapi-generator-ignore \
|
||||
--additional-properties=useSingleRequestParameter="true",withSeparateModelsAndApi="true",npmName="axios",snapshotVersion="-SNAPSHOT.$(Build.BuildNumber)",npmRepository="https://pkgs.dev.azure.com/jellyfin-project/jellyfin/_packaging/unstable/npm/registry/"
|
Loading…
Reference in new issue