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 } #检查是否正在部署