Skip to content

Commit

Permalink
fix: reinstate v stripping in build (#2220)
Browse files Browse the repository at this point in the history
We pass the tagged version number into docker builds. In some cases this
number is written into the 'version' field of package json. We write
this number in without the 'v' at the start so it needs removing at some
point in the build process.

This version number is then made available to consumers of the
application.
  • Loading branch information
ludamad authored Sep 12, 2023
1 parent 4f3ecee commit 13d34f5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,9 @@ if [[ -n "$COMMIT_TAG" ]]; then
COMMIT_TAG_VERSION=$COMMIT_TAG
fi

## We are building a tagged commit. Check it's a valid semver.
#VERSION=$(npx semver $COMMIT_TAG_VERSION)
#if [ -z "$VERSION" ]; then
# COMMIT_TAG_VERSION=""
#else
# COMMIT_TAG_VERSION=$VERSION
#fi
# We are building a tagged commit.
# We prefer to strip the leading 'v' (if it exists) from versions when passing to docker.
COMMIT_TAG_VERSION=${COMMIT_TAG_VERSION#v}
else
COMMIT_TAG_VERSION=""
fi
Expand Down

0 comments on commit 13d34f5

Please sign in to comment.