This commit is contained in:
by 2024-11-06 09:27:44 +08:00
commit c67fc81182
1 changed files with 3 additions and 4 deletions

View File

@ -17,8 +17,7 @@ default:
cache:
key: "$CI_COMMIT_REF_NAME-$(md5sum go.mod go.sum)"
paths:
- .cache/go-build/
- $GOPATH/pkg/mod/
- ~/.cache/go-build/
policy: pull-push
# 锁定作业,防止并发流水线执行
@ -47,7 +46,7 @@ build-job:
fi
# 拷贝到GOPATH
- echo '拷贝到GOPATH'
- rsync -rv --no-perms --delete ./* $GOPATH/src/$ProjectPath
- rsync -rvc --no-perms --delete ./* $GOPATH/src/$ProjectPath
# 进入项目目录
- cd $GOPATH/src/$ProjectPath
# 编译
@ -61,7 +60,7 @@ build-job:
do
cd $line
echo "编译 $line"
go build
go build -v
cd ..
done < shell/programs.txt