From c962b6f4b9c65b85aa4e929927163f70c81576eb Mon Sep 17 00:00:00 2001 From: Tw93 Date: Mon, 29 Dec 2025 22:11:43 +0800 Subject: [PATCH] update install V tag --- install.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 7c045f9..9c9020b 100755 --- a/install.sh +++ b/install.sh @@ -217,11 +217,7 @@ get_latest_release_tag() { if [[ -z "$tag" ]]; then return 1 fi - if [[ "$tag" != V* && "$tag" != v* ]]; then - tag="V${tag}" - else - tag="V${tag#v}" - fi + # Return tag as-is; normalize_release_tag will handle standardization printf '%s\n' "$tag" } @@ -238,8 +234,11 @@ get_latest_release_tag_from_git() { normalize_release_tag() { local tag="$1" - tag="${tag#v}" - tag="${tag#V}" + # Remove all leading 'v' or 'V' prefixes (handle edge cases like VV1.0.0) + while [[ "$tag" =~ ^[vV] ]]; do + tag="${tag#v}" + tag="${tag#V}" + done if [[ -n "$tag" ]]; then printf 'V%s\n' "$tag" fi