123456789101112131415161718 |
- #!/bin/bash
- # cd /data/project/web/tingbang
- # git pull
- # cd /data/project/web/tingbang/htmldev/dashboard
- # npm run build
- # ssh root@81.68.157.237
- function git.branch {
- br=`git branch | grep '*'`
- echo ${br/* /}
- }
- git pull
- git status
- read -p "Enter your commit_message,please: " commit_message
- git add .
- git commit -m ${commit_message}
- git push origin ${git.branch}
- echo '代码提交成功'
|