From ace5ba131d3df09e21d6ed68d887894a155d2f45 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 9 Feb 2023 17:16:06 -0800 Subject: [PATCH] fix: modify `version.sh` to handle `+...` suffixes --- version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.sh b/version.sh index 35c8a908e..8e265ab7a 100755 --- a/version.sh +++ b/version.sh @@ -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