Score
0
Watch 118 Star 320 Fork 102

一灰灰Blog / quick-alarmJava

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
通用报警框架,支持报警方式自定义,报警配置自定义 spread retract

Clone or download
deploy.sh 1.09 KB
Copy Edit Web IDE Raw Blame History
yihui authored 2018-02-12 12:35 . 添加deploy脚本
#!/bin/bash
if [ $# != 1 ];then
echo 'deploy argument [snapshot(s for short) | release(r for short) ] needed!'
exit 0
fi
## deploy参数,snapshot 表示快照包,简写为s, release表示正式包,简写为r
arg=$1
DEPLOY_PATH=/Users/yihui/GitHub/maven-repository/
CURRENT_PATH=`pwd`
deployFunc(){
br=$1
## 快照包发布
cd $DEPLOY_PATH
## 切换对应分支
git checkout $br
cd $CURRENT_PATH
# 开始deploy
mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=self-mvn-repo::default::file:/Users/yihui/GitHub/maven-repository/repository
# deploy 完成,提交
cd $DEPLOY_PATH
git add -am 'deploy'
git push origin $br
# 合并master分支
git checkout master
git merge $br
git commit -am 'merge'
git push origin master
cd $CURRENT_PATH
}
if [ $arg = 'snapshot' ] || [ $arg = 's' ];then
## 快照包发布
deployFunc snapshot
elif [ $arg = 'release' ] || [ $arg = 'r' ];then
## 正式包发布
deployFunc release
else
echo 'argument should be snapshot(s for short) or release(r for short). like: `sh deploy.sh snapshot` or `sh deploy.sh s`'
fi

Comment ( 0 )

Sign in for post a comment

Java
1
https://gitee.com/liuyueyi/quick-alarm.git
git@gitee.com:liuyueyi/quick-alarm.git
liuyueyi
quick-alarm
quick-alarm
master

Help Search