Skip to content

Commit 1ba38b7

Browse files
committed
Fix base version extraction to remove all hotfix suffixes
Use %% (longest suffix removal) instead of % (shortest suffix removal) in bash parameter expansion to correctly extract base version from tags like v0.0.1137-hotfix-1-hotfix-2.
1 parent 475cee1 commit 1ba38b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/release-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
4747
# Extract base version (remove hotfix suffix if present)
4848
if [[ $LATEST_TAG =~ -hotfix-[0-9]+$ ]]; then
49-
# It's a hotfix tag, extract the base version
50-
CURRENT_VERSION="${LATEST_TAG%-hotfix-*}"
49+
# It's a hotfix tag, extract the base version (remove all -hotfix-* suffixes)
50+
CURRENT_VERSION="${LATEST_TAG%%-hotfix-*}"
5151
else
5252
# It's a regular tag
5353
CURRENT_VERSION="$LATEST_TAG"

0 commit comments

Comments
 (0)