From c8a5a5a4d06a36aa1e45a8d98d3ec633daf5825b Mon Sep 17 00:00:00 2001 From: giaogiao Date: Mon, 25 Sep 2023 16:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=8F=AA=E6=89=93=E5=8C=85linux=20amd64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bulid.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bulid.sh b/bulid.sh index b50def9..875e87e 100644 --- a/bulid.sh +++ b/bulid.sh @@ -33,8 +33,7 @@ # windows/arm64" #只打包两个版本 -CPU_architecture="linux/amd64 -windows/amd64" +CPU_architecture="linux/amd64" for line in $CPU_architecture do @@ -46,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 -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/ done