From 77401657f58f18b1b418c3b4cb602e966404d312 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Mon, 8 Jul 2024 15:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=BB=98=E8=AE=A4=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/cid.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/handler/cid.go b/handler/cid.go index 0bd0dda..85a6429 100644 --- a/handler/cid.go +++ b/handler/cid.go @@ -188,21 +188,6 @@ func RunShell(username, url, script string, id, authID int) { //脚本内容,不同用户的持续集成、部署目录不同 scriptContent := ` echo "start" -TARGET_DIR=` + proto.CID_BASE_DIR + username + "/" + name + ` -if [ ! -d $TARGET_DIR ]; then - git clone ` + url + ` - if [ $? -ne 0 ]; then - echo "Failed to clone repository." - fi -fi -cd $TARGET_DIR -if [ $? -ne 0 ]; then - echo "Failed to change directory to $TARGET_DIR." -fi -git pull -if [ $? -ne 0 ]; then - echo "Failed to pull repository." -fi ` + script + ` echo "end"` //执行脚本