-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload.sh
executable file
·52 lines (42 loc) · 969 Bytes
/
upload.sh
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
#!/bin/bash
Cyan='\033[0;36m'
Default='\033[0;m'
version=""
repoName=""
confirmed="n"
getVersion() {
read -p "请输入版本号: " version
if test -z "$version"; then
getVersion
fi
}
getRepoName() {
read -p "请输入仓库名: " repoName
if test -z "$repoName"; then
getRepoName
fi
}
getInfomation() {
getVersion
getRepoName
echo -e "\n${Default}================================================"
echo -e " Version : ${Cyan}${version}${Default}"
echo -e " RepoName : ${Cyan}${repoName}${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 "确定? (y/n):" confirmed
done
git add .
git commit -m "update to repo"
git tag $version
git push
git push --tags
pod repo push $repoName --allow-warnings --use-libraries
say "finished"
echo "finished"