删除默认脚本

This commit is contained in:
junleea 2024-07-08 15:48:40 +08:00
parent ec0a266763
commit 77401657f5
1 changed files with 0 additions and 15 deletions

View File

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