代码拉取完成,页面将自动刷新
#!/bin/bash
echo "deploy tms to tomcat start"
DEST=/Users/xiweicheng/Applications/apache-tomcat-8.5.59
SRC=/Users/xiweicheng/tms
echo "DEST DIR: $DEST"
echo "SRC DIR: $SRC"
echo "mvn clean compile"
mvn clean compile
DT=`date +"%Y%m%d%H%M%S"`
mkdir -p $DEST/backup/tms/$DT
cp -rf $DEST/webapps/ROOT/WEB-INF/classes/com $DEST/backup/tms/$DT
cp -rf $DEST/webapps/ROOT/WEB-INF/classes/static $DEST/backup/tms/$DT
cp -rf $DEST/webapps/ROOT/WEB-INF/classes/templates $DEST/backup/tms/$DT
echo "backup path: $DEST/backup/tms/$DT"
echo "rm com & static & templates"
rm -rf $DEST/webapps/ROOT/WEB-INF/classes/com
rm -rf $DEST/webapps/ROOT/WEB-INF/classes/static
rm -rf $DEST/webapps/ROOT/WEB-INF/classes/templates
echo "cp tms to local tomcat"
cp -rf $SRC/target/classes/com $DEST/webapps/ROOT/WEB-INF/classes
cp -rf $SRC/src/main/resources/static $DEST/webapps/ROOT/WEB-INF/classes
cp -rf $SRC/src/main/resources/templates $DEST/webapps/ROOT/WEB-INF/classes
sh $DEST/bin/shutdown.sh
sleep 5
sh $DEST/bin/startup.sh
echo "deploy tms to tomcat end"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。