Skip to content

Commit

Permalink
fix: modify version.sh to handle +... suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abrown committed Feb 10, 2023
1 parent e856717 commit ace5ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -e
git config --global --add safe.directory "/workspace"
GIT_DESCR=$(git describe --long --candidates=999 --match='wasi-sdk-*' --dirty='+m' --abbrev=12)
GIT_PACKAGE_VERSION=$(echo $GIT_DESCR | perl -ne 'if(/^wasi-sdk-(\d+)-(\d+)-g([0-9a-f]{7,12})([+]m)?$/) { if($2 == 0) { print "$1.$2$4" } else { print "$1.$2g$3$4" } exit } else { print "could not parse git description"; exit 1 }';)
GIT_PACKAGE_VERSION=$(echo $GIT_DESCR | perl -ne 'if(/^wasi-sdk-(\d+)([+].+)?-(\d+)-g([0-9a-f]{7,12})([+]m)?$/) { if($3 == 0) { print "$1.$3$5$2" } else { print "$1.$3g$4$5$2" } exit } else { print "could not parse git description"; exit 1 }';)
echo $GIT_PACKAGE_VERSION

0 comments on commit ace5ba1

Please sign in to comment.