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"` //执行脚本