再次修改打包脚本
continuous-integration/drone/push Build encountered an error Details

This commit is contained in:
giaogiao 2023-09-25 17:10:30 +08:00
parent c21f0da9c7
commit c28dbea1a9
1 changed files with 1 additions and 1 deletions

View File

@ -45,6 +45,6 @@ do
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}"
# 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 -ldflags="-w -s" -o ${array[0]}_${array[1]}_main${extension}
CGO_ENABLED=1 GOOS=${array[0]} GOARCH=${array[1]} go build -ldflags "-linkmode external -extldflags '-static' -s -w" -o ${array[0]}_${array[1]}_main${extension}
cp ${array[0]}_${array[1]}_main${extension} /root/web/
done