master
pan 4 years ago
parent e7ee9870bf
commit ae7ad3e8be
  1. 9
      shell/updateRisk

@ -11,14 +11,15 @@ export apiServer=https://risk.kirito.cool
function run(){ function run(){
isCreate=false
if [ ! -e $1 ] if [ ! -e $1 ]
then then
git clone git@gogs.kirito.cool:panqihua/$1.git git clone git@gogs.kirito.cool:panqihua/$1.git
isCreate=true isUpdate=false
else
isUpdate=true
fi fi
cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode
if [ isCreate ] if [ $isUpdate ]
then then
url="http://127.0.0.1:3000/finsh?name=$1" url="http://127.0.0.1:3000/finsh?name=$1"
echo "成功回调地址:$url" echo "成功回调地址:$url"
@ -27,7 +28,7 @@ function run(){
} }
#检查是否正在部署 #检查是否正在部署
command ="ps -ef|grep "updateRisk $1"|awk 'NR>1{next}{print $1}'" command ="ps -ef|grep 'updateRisk $1'|awk 'NR>1{next}{print $1}'"
echo $command echo $command
result=${command} result=${command}
echo $result echo $result

Loading…
Cancel
Save