-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitPush自定义版本号.sh
43 lines (35 loc) · 1.17 KB
/
gitPush自定义版本号.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
#!/bin/sh
echo 开始获取最新内容
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
git pull
echo 获取更新执行结束!
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo 开始获取最近3三次提交日志
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
git log -3
echo q
echo 退出日志查看执行结束!
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo 开始添加变更
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
git add .
echo 执行结束!
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo;
echo 提交变更到本地仓库
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo 输入修改版本号:
read input
git commit -m "$input"
echo 数据成功提交到暂存库
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo;
echo 将变更情况提交到远程git服务器
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
git push origin master
echo 数据成功提交到服务器
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo;
echo 批处理执行完毕!
echo;
pause