@@ -28,9 +28,9 @@ tag_glob='v[0-9].[0-9].[0-9]*'
28
28
29
29
# Terminal colors
30
30
OFF=' \033[0m'
31
- RED =' \033[0 ;31m'
32
- GREEN =' \033[0 ;32m'
33
- BLUE =' \033[0 ;34m'
31
+ BOLD_RED =' \033[1 ;31m'
32
+ BOLD_GREEN =' \033[1 ;32m'
33
+ BOLD_BLUE =' \033[1 ;34m'
34
34
35
35
# Get the latest release tag
36
36
if ! latest_tag=$( git describe --abbrev=0 --match=" $tag_glob " ) ; then
@@ -40,25 +40,25 @@ if ! latest_tag=$(git describe --abbrev=0 --match="$tag_glob"); then
40
40
fi
41
41
42
42
# Display the latest release tag
43
- echo -e " The latest release tag is: ${BLUE }${latest_tag}${OFF} "
43
+ echo -e " The latest release tag is: ${BOLD_BLUE }${latest_tag}${OFF} "
44
44
45
45
# Prompt the user for the new release tag
46
46
read -r -p ' Enter a new release tag (vX.X.X format): ' new_tag
47
47
48
48
# Validate the new release tag
49
49
if echo " $new_tag " | grep -q -E " $tag_regex " ; then
50
- echo -e " Tag: ${BLUE } $new_tag ${OFF} is valid"
50
+ echo -e " Tag: ${BOLD_BLUE } $new_tag ${OFF} is valid"
51
51
else
52
52
# Release tag is not `vX.X.X` format
53
- echo -e " Tag: ${BLUE } $new_tag ${OFF} is ${RED } not valid${OFF} (must be in vX.X.X format)"
53
+ echo -e " Tag: ${BOLD_BLUE } $new_tag ${OFF} is ${BOLD_RED } not valid${OFF} (must be in vX.X.X format)"
54
54
exit 1
55
55
fi
56
56
57
57
# Tag the new release
58
58
git tag -a " $new_tag " -m " $new_tag Release"
59
- echo -e " ${GREEN } Tagged: $new_tag ${OFF} "
59
+ echo -e " ${BOLD_GREEN } Tagged: $new_tag ${OFF} "
60
60
61
61
# Push the new tag to the remote
62
62
git push --follow-tags
63
- echo -e " ${GREEN } Release tag pushed to remote${OFF} "
64
- echo -e " ${GREEN } Done!${OFF} "
63
+ echo -e " ${BOLD_GREEN } Release tag pushed to remote${OFF} "
64
+ echo -e " ${BOLD_GREEN } Done!${OFF} "
0 commit comments