From 5109d558d927a3aa5ebc12ab4c961f0213946197 Mon Sep 17 00:00:00 2001 From: crobibero Date: Fri, 9 Oct 2020 09:52:05 -0600 Subject: [PATCH] fix npm install order --- .ci/azure-pipelines-api-client.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.ci/azure-pipelines-api-client.yml b/.ci/azure-pipelines-api-client.yml index 35a494cd6..fc89b90d4 100644 --- a/.ci/azure-pipelines-api-client.yml +++ b/.ci/azure-pipelines-api-client.yml @@ -28,13 +28,7 @@ jobs: inputs: script: "wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/${{ parameters.GeneratorVersion }}/openapi-generator-cli-${{ parameters.GeneratorVersion }}.jar -O openapi-generator-cli.jar" - - task: Npm@1 - displayName: 'Install npm dependencies' - inputs: - command: install - workingDir: ./apiclient/generated/typescript/axios - -# Generate npm api client +## Generate npm api client # Unstable - task: CmdLine@2 displayName: 'Build unstable typescript axios client' @@ -42,6 +36,22 @@ jobs: inputs: script: "bash ./apiclient/templates/typescript/axios/generate.sh $(System.ArtifactsDirectory) $(Build.BuildNumber)" +# Stable + - task: CmdLine@2 + displayName: 'Build stable typescript axios client' + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v') + inputs: + script: "bash ./apiclient/templates/typescript/axios/generate.sh $(System.ArtifactsDirectory)" + +## Run npm install + - task: Npm@1 + displayName: 'Install npm dependencies' + inputs: + command: install + workingDir: ./apiclient/generated/typescript/axios + +## Publish npm packages +# Unstable - task: Npm@1 displayName: 'Publish unstable typescript axios client' condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master') @@ -52,12 +62,6 @@ jobs: workingDir: ./apiclient/generated/typescript/axios # Stable - - task: CmdLine@2 - displayName: 'Build stable typescript axios client' - condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v') - inputs: - script: "bash ./apiclient/templates/typescript/axios/generate.sh $(System.ArtifactsDirectory)" - - task: Npm@1 displayName: 'Publish stable typescript axios client' condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')