环境:
linux
mysql
Apache-tomcat
maven
git
...
shell脚本:
build.sh
mvn clean compile package -Dmaven.test.skip=true
deploy.sh
GIT_DIR=/home/GitRep/otp
TOMCAT_ADMIN=/home/software/apache-tomcat
WAR_DIR_ADMIN=/home/GitRep/web/target
cd $GIT_DIR
git checkout master && git pull
sh ./build.sh
sh $TOMCAT_ADMIN/bin/shutdown.sh
rm -rf $TOMCAT_ADMIN/webapps/web
cp $WAR_DIR_ADMIN/admin.war $TOMCAT_ADMIN/webapps/web.war
sh $TOMCAT_API/bin/startup.sh