-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtag.sh
More file actions
executable file
·48 lines (35 loc) · 831 Bytes
/
tag.sh
File metadata and controls
executable file
·48 lines (35 loc) · 831 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
Cyan='\033[0;36m'
Default='\033[0;m'
tag=""
confirmed="n"
getTag() {
read -p "Enter tag: " tag
if test -z "$tag"; then
getTag
fi
}
getInfomation() {
getTag
echo -e "\n${Default}================================================"
echo -e " tag : ${Cyan}${tag}${Default}"
echo -e "================================================\n"
}
echo -e "\n"
while [ "$confirmed" != "y" -a "$confirmed" != "Y" ]
do
if [ "$confirmed" == "n" -o "$confirmed" == "N" ]; then
getInfomation
fi
read -p "confirm? (y/n):" confirmed
done
specFilePath="HCModuleLifecycle.podspec"
echo "editing..."
sed -i "" "s%s.version .*%s.version = \"${tag}\"%g" "$specFilePath"
echo "edit finished"
echo "adding tag..."
git add .
git commit -m "${tag}"
git tag ${tag}
git push origin master --tags
echo "finished adding tag"