File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ OFF='\033[0m'
31
31
BOLD_RED=' \033[1;31m'
32
32
BOLD_GREEN=' \033[1;32m'
33
33
BOLD_BLUE=' \033[1;34m'
34
+ BOLD_PURPLE=' \033[1;35m'
35
+ BOLD_UNDERLINED=' \033[1;4m'
34
36
35
37
# Get the latest release tag
36
38
if ! latest_tag=$( git describe --abbrev=0 --match=" $tag_glob " ) ; then
54
56
exit 1
55
57
fi
56
58
59
+ # Remind user to update the version field in package.json
60
+ echo -e -n " Make sure the version field in package.json is ${BOLD_BLUE} $new_tag ${OFF} . Yes? [Y/${BOLD_UNDERLINED} n${OFF} ] "
61
+ read -r YN
62
+
63
+ if [[ ! ($YN == " y" || $YN == " Y" ) ]]; then
64
+ # Package.json version field is not up to date
65
+ echo -e " Please update the package.json version to ${BOLD_PURPLE} $new_tag ${OFF} and commit your changes"
66
+ exit 1
67
+ fi
68
+
57
69
# Tag the new release
58
70
git tag -a " $new_tag " -m " $new_tag Release"
59
71
echo -e " ${BOLD_GREEN} Tagged: $new_tag ${OFF} "
You can’t perform that action at this time.
0 commit comments