Git shell

来源:互联网 发布:淘宝注册公司靠谱吗 编辑:程序博客网 时间:2024/05/18 02:17
#! /bin/bash
cd /home/huatu_code/workflow-service/
rm -rf target/
git fetch --all
git reset --hard origin/develop
git pull
mvn clean
mvn compile
mvn install
kill -9 $(ps -ef|grep workflow-service-0.0.1|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')
cd /home/huatuCloud/
mv workflow-service-0.0.1-SNAPSHOT.jar workflow-service-0.0.1-SNAPSHOT.jar_$(date +%Y%m%d-%H%M%S) 
mv /home/huatu_code/workflow-service/target/workflow-service-0.0.1-SNAPSHOT.jar /home/huatuCloud/
nohup java -jar workflow-service-0.0.1-SNAPSHOT.jar > workflow-nohup.log 2>&1 &
ps -lef|grep workflow-service-0.0.1

原创粉丝点击