diff --git a/script/release b/script/release index 0a0036ff..edeccabd 100755 --- a/script/release +++ b/script/release @@ -13,8 +13,8 @@ latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) echo -e "The latest release tag is: ${BLUE}${latest_tag}${OFF}" read -p 'New Release Tag (vX.X.X format): ' new_tag -tag_regex='^v\d\.\d\.\d$' -echo "$new_tag" | grep -E -q $tag_regex +tag_regex='^v[0-9]+\.[0-9]+\.[0-9]+$' +echo "$new_tag" | grep -E "$tag_regex" if [[ $? -ne 0 ]]; then echo -e "${RED}ERROR${OFF} - Tag: $new_tag is not valid. Please use vX.X.X format."