forked from vipul-08/MyChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbump_version.sh
More file actions
33 lines (22 loc) · 717 Bytes
/
Copy pathbump_version.sh
File metadata and controls
33 lines (22 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
NO_OF_COMMITS=$(git rev-list --count HEAD);
UPDATE_VERSION="0.1.${NO_OF_COMMITS}";
echo -e "\nBumping MyChat to version ${UPDATE_VERSION}";
echo -e "\nProvide a changelog for the update [Press ENTER]"
read -r;
nano update_message.txt;
echo -e "\nThe Provided Update Message is: \n";
cat update_message.txt;
echo -e "\nSign the Tag ? [y/n]";
read -r SIGN_TAG;
ARGS=" ";
if [[ "${SIGN_TAG}" == [Yy] ]]; then
ARGS=" -s";
fi
COMMAND="git tag -a${ARGS} -F update_message.txt v${UPDATE_VERSION}"
echo -e "> $COMMAND";
if $($COMMAND); then
echo -e "\nTag Created Successfully\n";
echo -e "\nRun: git push origin master && git push origin v${UPDATE_VERSION}";
echo -e "Sayonara";
rm -f update_message.txt;
fi