forked from zhangyd-c/OneBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.sh
41 lines (38 loc) · 841 Bytes
/
cli.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
#!/bin/bash
help(){
echo "--------------------------------------------------------------------------"
echo ""
echo "usage: ./cli.sh [updv]"
echo ""
echo "-updv [version num] Update all oneblog related versions."
echo ""
echo "--------------------------------------------------------------------------"
}
case "$1" in
'updv')
docs/bin/updVersion.sh $2
;;
'b')
docs/bin/build.sh
;;
'p')
docs/bin/push.sh
;;
'dd')
read -p '是否重新执行 mvn package?[y/n]' repeat
if [ "${repeat}" = "y" -o "${repeat}" = "Y" ];then
mvn -X clean package -Dmaven.test.skip=true
STATUS=$?
if [[ $STATUS == 0 ]]; then
docs/bin/deploy-docker.sh
else
echoError "打包失败"
exit 1
fi
else
docs/bin/deploy-docker.sh
fi
;;
*)
help
esac