forked from telemed-duth/carre-edu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update
executable file
·61 lines (53 loc) · 1.26 KB
/
update
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# stop executing if any command exits with non zero value
set -e
echo "Running tests..."
grunt test;
echo "Fetching changes from repo..."
git pull;
PS3='Create new tag for this version? (y/N): '
options=("y" "n")
select opt in "${options[@]}"
do
case $opt in
"y")
export TASK=":bump"
break
;;
"n")
export TASK=":bump-only"
break
;;
*) echo "Invalid option"; break ;;
esac
done
PS3='Change version (Semantic Versioning): '
options=("Major 1.x.x" "Minor x.1.x" "Patch x.x.1" "No change")
select opt in "${options[@]}"
do
case $opt in
"Major 1.x.x")
grunt bump:major$TASK
break
;;
"Minor x.1.x")
grunt bump:minor$TASK
break
;;
"Patch x.x.1")
grunt bump:patch$TASK
break
;;
"No change")
break
;;
*) echo "Invalid option"; break ;;
esac
done
echo "Uploading to repository..."
git add --all release-notes/
grunt changelog:v1 && grunt changelog:v1 && git add --all release-notes/
echo -ne "\e[92mAdd to Changelog?\e[39m : "
read -e MSG
git commit -am"CLI: $MSG";
git push && git push --tags