From 65c34e387f19cacdc1d0f399f6aa9eb91bc0bb87 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 10 Oct 2020 04:14:59 +0800 Subject: [PATCH] init --- shell/updateRisk | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/shell/updateRisk b/shell/updateRisk index 5a5935a..83f4102 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -13,12 +13,21 @@ export apiServer=https://risk.kirito.cool function run(){ if [ ! -e $1 ] then - git clone git@gogs.kirito.cool:panqihua/$1.git + git clone git@gogs.kirito.cool:panqihua/$1.git + isUpdate=false + else + isUpdate=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 [ $isUpdate ] + then + echo "克隆仓库代码" + url="http://127.0.0.1:3000/finsh?name=$1" + echo "成功回调地址:$url" + curl $url + else + echo "更新仓库代码" + fi } #检查是否正在部署