From b17c37332ad4294473dfd61950f93bd755009424 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 29 May 2024 11:23:15 +0800 Subject: [PATCH] version_compare.sh handles version that starts with v --- scripts/version_compare.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/version_compare.sh b/scripts/version_compare.sh index 940b518..a663cb1 100755 --- a/scripts/version_compare.sh +++ b/scripts/version_compare.sh @@ -6,6 +6,11 @@ version="3.8.3" # Version to compare compare_version="$1" +# Remove the leading 'v' if it exists +compare_version=$(echo "$compare_version" | sed 's/^v//') + +echo "compare_version: ${compare_version}" + # Function to execute if the version is less than the given version function do_something { echo "Executing task for version less than $version"