修改打包脚本只打包linux amd64
continuous-integration/drone/push Build is failing Details

This commit is contained in:
giaogiao 2023-09-25 16:22:34 +08:00
parent 725577cf24
commit c8a5a5a4d0
1 changed files with 2 additions and 3 deletions

View File

@ -33,8 +33,7 @@
# windows/arm64" # windows/arm64"
#只打包两个版本 #只打包两个版本
CPU_architecture="linux/amd64 CPU_architecture="linux/amd64"
windows/amd64"
for line in $CPU_architecture for line in $CPU_architecture
do do
@ -46,6 +45,6 @@ do
echo "Start compiling the system:${array[0]} architecture:${array[1]}" echo "Start compiling the system:${array[0]} architecture:${array[1]}"
# echo "CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}" # echo "CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}"
# CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension} # CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}
CGO_ENABLED=1 GOOS=${array[0]} GOARCH=${array[1]} go build -o ${array[0]}_${array[1]}_main${extension} CGO_ENABLED=1 -ldflags="-w -s" GOOS=${array[0]} GOARCH=${array[1]} go build -o ${array[0]}_${array[1]}_main${extension}
cp ${array[0]}_${array[1]}_main${extension} /root/web/ cp ${array[0]}_${array[1]}_main${extension} /root/web/
done done