删除默认脚本
This commit is contained in:
parent
ec0a266763
commit
77401657f5
|
|
@ -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"`
|
||||
//执行脚本
|
||||
|
|
|
|||
Loading…
Reference in New Issue