From 39e907482bdb01101e7c6a6432cdcb19dc4dcd47 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Wed, 28 May 2025 16:42:30 +1000 Subject: [PATCH] ci: remove trailing dot from release versions --- scripts/version.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/version.sh b/scripts/version.sh index 3ca8d03..602a800 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -48,7 +48,9 @@ if [[ $describe_output =~ ^v([0-9]+\.[0-9]+\.[0-9]+)(-([0-9]+)-g[a-f0-9]+)?$ ]]; version=${BASH_REMATCH[1]} # X.Y.Z commits=${BASH_REMATCH[3]} # number of commits since tag - if [[ "$SHORT" == true ]]; then + # If we're producing a short version string, or this is a release version + # (no commits since tag) + if [[ "$SHORT" == true ]] || [[ -z "$commits" ]]; then echo "$version" exit 0 fi