From e7ee9870bfda822102c3f93d3e7a3102beacb6b5 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 10 Oct 2020 03:34:37 +0800 Subject: [PATCH] init --- shell/updateRisk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shell/updateRisk b/shell/updateRisk index 8c7af9d..ca04a2e 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -11,14 +11,19 @@ export apiServer=https://risk.kirito.cool function run(){ + isCreate=false if [ ! -e $1 ] then git clone git@gogs.kirito.cool:panqihua/$1.git + isCreate=true fi cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode - url="http://127.0.0.1:3000/finsh?name=$1" - echo "成功回调地址:$url" - curl $url + if [ isCreate ] + then + url="http://127.0.0.1:3000/finsh?name=$1" + echo "成功回调地址:$url" + curl $url + fi } #检查是否正在部署