Skip to content

Commit

Permalink
fix(docker): report correct version number instead of 0.0.0 (#1610)
Browse files Browse the repository at this point in the history
  • Loading branch information
billiegoose authored May 10, 2021
1 parent db0a676 commit 4f4f2ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hooks/pre_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
echo "SOURCE_BRANCH=$SOURCE_BRANCH";
if [[ -n "$SOURCE_BRANCH" ]]; then
VERSION="${SOURCE_BRANCH/v/}";
echo "VERSION=$VERSION";
CONTENTS=$(cat package.json);
NEWCONTENTS="${CONTENTS/0\.0\.0/$VERSION}";
echo "$NEWCONTENTS" > package.json;
fi

0 comments on commit 4f4f2ba

Please sign in to comment.