Skip to content

Commit

Permalink
fix: tweak version script that was returning an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Jan 14, 2025
1 parent d3bf2f0 commit c8c540d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
REF=$1

versionFile=$(cat VERSION | tr -d '[:space:]')
echo "Using version '${versionFile}'"
if [[ $REF == refs/tags/* ]]; then
# check if versionFile equals the tag.
if [[ $versionFile != "${REF#refs/tags/}" ]]; then
Expand All @@ -13,7 +14,7 @@ if [[ $REF == refs/tags/* ]]; then
else
# if this isnt a release, add the commit hash to the end of the version
v=$(git rev-parse --short HEAD)
updatedVersion = "${versionFile}+${v}"
updatedVersion="${versionFile}+${v}"
echo "Updated version to '${updatedVersion}'"
echo -n $updatedVersion > VERSION
fi

0 comments on commit c8c540d

Please sign in to comment.