#! /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