From 16cf5b656c1b47e848a5aab1a4f2f6b87c81dddf 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 8742623d6e23..d3ec4c1e765c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -49,11 +49,11 @@ help() { main() { VERSION=$1 - if [[ ! "${VERSION}" =~ [0-9]+.[0-9]+.[0-9]+ ]]; then + if [[ ! "${VERSION}" =~ ^v?[0-9]+.[0-9]+.[0-9]+ ]]; then log_error "Expected 'version' param of the form '..' but got '${VERSION}'" exit 1 fi - RELEASE_VERSION="v${VERSION}" + RELEASE_VERSION="v${VERSION#v}" MINOR_VERSION=$(echo "${VERSION}" | cut -d. -f 1-2) if [ "${IN_PLACE}" == 1 ]; then