Skip to content

Commit

Permalink
Package versions does not land in the buildInformation (#248)
Browse files Browse the repository at this point in the history
* fix: use VERSION env in writeBuildInformation.sh

* ci: add VERSION to build:ci
  • Loading branch information
jkoenig134 authored Aug 23, 2024
1 parent 41334be commit c5b3499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .ci/writeBuildInformation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if [ -z "$(which jq)" ]; then
exit 1
fi

if [ -z "$VERSION" ]; then
echo "The environment variable 'VERSION' must be set."
exit 1
fi

if [ -z "$BUILD_NUMBER" ]; then
echo "The environment variable 'BUILD_NUMBER' must be set."
exit 1
Expand All @@ -23,12 +28,6 @@ fi

DEPENDENCIES="${DEPENDENCIES//[\/]/\\/}" # replace '/' with '\/' because it's a special char

VERSION=$(jq .version package.json -cr)
if [ -z "$VERSION" ]; then
echo "Couldn't read the version from package.json."
exit 1
fi

DATE=$(date -u --iso-8601=seconds)

TARGET_FILE="./dist/buildInformation.js"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
env:
BUILD_NUMBER: ${{ github.run_number }}
COMMIT_HASH: ${{ github.sha }}
VERSION: ${{ github.ref_name }}
- run: bash .ci/publishNpm.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down

0 comments on commit c5b3499

Please sign in to comment.