添加 'build_go.sh'
This commit is contained in:
13
build_go.sh
Normal file
13
build_go.sh
Normal file
@@ -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 "✅ 编译完成"
|
||||
Reference in New Issue
Block a user