diff --git a/ci/templates/build-data.yaml b/ci/templates/build-data.yaml index 711551fe..23bdb030 100644 --- a/ci/templates/build-data.yaml +++ b/ci/templates/build-data.yaml @@ -1,13 +1,17 @@ steps: - script: | + #!/bin/bash + set -ex -o pipefail + env | sort + # handle full version number - VERSION=$(jq '.version' $(Build.SourcesDirectory)/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]).*/\1/") + VERSION=$(jq '.version' $(Build.SourcesDirectory)/docker/fabric-nodeenv/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]).*/\1/") echo Current version in code is :${VERSION}: echo "##vso[task.setvariable variable=PACKAGE_VERSION;isOutput=true]${VERSION}" # handle minor version - MINOR_VERSION=$(jq '.version' $(Build.SourcesDirectory)/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9])\.[0-9]?[0-9].*/\1/") + MINOR_VERSION=$(jq '.version' $(Build.SourcesDirectory)/docker/fabric-nodeenv/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9])\.[0-9]?[0-9].*/\1/") echo Current minor version in code is :${MINOR_VERSION}: echo "##vso[task.setvariable variable=MINOR_PACKAGE_VERSION;isOutput=true]${MINOR_VERSION}"