diff --git a/build_go.sh b/build_go.sh new file mode 100644 index 0000000..8445d08 --- /dev/null +++ b/build_go.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +echo "=== Jenkins 编译 Go 项目 ===" + +# 设置阿里源 +export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct + +echo "使用阿里源下载依赖..." +CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o quincy-admin-linux + +pwd +echo "✅ 编译完成" \ No newline at end of file