Skip to content

Commit

Permalink
Use JQ arg to pass in version variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jsheely committed Sep 16, 2020
1 parent 5c25428 commit b619f65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ stages:
sudo apt update
sudo apt install jq -y
version=$(jq -r ".version" package.json)
version=$(echo $version | perl -pe 's/\.[\d]+$/$(Build.BuildId)/')
jq '.version="$(echo $version)"' package.json > package.tmp.json && mv package.tmp.json package.json
version=$(echo $version | perl -pe 's/\.[\d]+$/.$(Build.BuildId)/')
jq --arg version $version '.version=$version' package.json > package.tmp.json && mv package.tmp.json package.json
echo "Version set to: $version"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@3
displayName: Yarn Install
Expand Down

0 comments on commit b619f65

Please sign in to comment.