tomcat git linux部署脚本

#!/bin/sh
#author : cc

#停服务
sh /ROOT/scripts/tomcat_service_control/autonavi_aos_pns_manage_8180.sh stop

#删除文件及缓存
sudo rm -rf /ROOT/server/taobao-tomcat-7.0.64/webapps/pns-pushservice
sudo rm -rf /ROOT/server/taobao-tomcat-7.0.64/webapps/pns-pushservice.war
sudo rm -rf /ROOT/server/taobao-tomcat-7.0.64/work/Catalina/localhost/pns-pushservice/*
sudo rm -rf /ROOT/www/pns-pushservice

www_root=/ROOT/www/
cd  $www_root
git clone [email protected]:xxxxxx.git
www_root=/ROOT/www/pns-pushservice
chmod -R 755 $www_root
cd  $www_root
#打包
mvn install -Dmaven.test.skip=true -U -P dev
#拷贝
cp  /ROOT/www/pns-pushservice/target/pns-pushservice.war /ROOT/server/taobao-tomcat-7.0.64/webapps/
chmod -R 755  /ROOT/server/taobao-tomcat-7.0.64/webapps/pns-pushservice.war
#开启
sh /ROOT/scripts/tomcat_service_control/autonavi_aos_pns_manage_8180.sh start

你可能感兴趣的:(tomcat,linux,部署,git,脚本)