We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b2c18d commit ad54e2aCopy full SHA for ad54e2a
script/release
@@ -13,11 +13,12 @@ latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
13
echo -e "The latest release tag is: ${BLUE}${latest_tag}${OFF}"
14
read -p 'New Release Tag (vX.X.X format): ' new_tag
15
16
-tag_regex='^v\d\.\d\.\d$'
17
-echo "$new_tag" | grep -P -q $tag_regex
+tag_regex='^v[0-9]+\.[0-9]+\.[0-9]+$'
+echo "$new_tag" | grep -E "$tag_regex"
18
19
if [[ $? -ne 0 ]]; then
20
- echo "Tag: $new_tag is valid"
+ echo -e "${RED}ERROR${OFF} - Tag: $new_tag is not valid. Please use vX.X.X format."
21
+ exit 1
22
fi
23
24
git tag -a $new_tag -m "$new_tag Release"
0 commit comments