From e1e1787fafb074079c2048b65b4de0169fc54e55 Mon Sep 17 00:00:00 2001 From: Ivan Valdes Date: Wed, 4 Dec 2024 11:17:33 -0800 Subject: [PATCH] release: allow to specify version with the "v" prefix The script currently fails if the version provided has the "v" prefix (i.e., v3.6.0). Allow receiving the prefix and continue with the process. Signed-off-by: Ivan Valdes --- scripts/release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 8742623d6..aaa1e612c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -48,8 +48,9 @@ help() { } main() { - VERSION=$1 - if [[ ! "${VERSION}" =~ [0-9]+.[0-9]+.[0-9]+ ]]; then + # Allow to receive the version with the "v" prefix, i.e. v3.6.0. + VERSION=${1#v} + if [[ ! "${VERSION}" =~ ^[0-9]+.[0-9]+.[0-9]+ ]]; then log_error "Expected 'version' param of the form '..' but got '${VERSION}'" exit 1 fi