From e09e41b4e1bdc3965d6595bcc04f840b2b523d17 Mon Sep 17 00:00:00 2001 From: Manas Jayanth <3097018+ManasJayanth@users.noreply.github.com> Date: Sat, 10 Jun 2023 12:57:45 +0530 Subject: [PATCH] CI: compute package version and use it job spec --- .ci/esy-build-steps.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/esy-build-steps.yml b/.ci/esy-build-steps.yml index 505f284..0147391 100644 --- a/.ci/esy-build-steps.yml +++ b/.ci/esy-build-steps.yml @@ -7,7 +7,10 @@ steps: versionSpec: '18.16.0' - bash: | NPM_CACHE_DIR=$(npm config get cache) + ESY_BASH_VERSION=$(node -e 'console.log(require("./package.json").version)') echo "##vso[task.setvariable variable=NPM_CACHE_DIR]$NPM_CACHE_DIR" + echo "##vso[task.setvariable variable=ESY_BASH_VERSION]$ESY_BASH_VERSION" + displayName: Compute pipeline variables - task: Cache@2 inputs: key: 'npm | "$(Build.SourcesDirectory)/package-lock.json"' @@ -26,8 +29,8 @@ steps: - task: PublishBuildArtifacts@1 displayName: 'Release Package' inputs: - PathtoPublish: './esy-bash-0.3.21.tgz' - ArtifactName: npm-package + PathtoPublish: './esy-bash-$(ESY_BASH_VERSION).tgz' + ArtifactName: esy-bash-$(ESY_BASH_VERSION) - script: node postinstall.js displayName: "node postinstall.js (iteration 1)" # TODO Figure e2e test