strip by default.

This commit is contained in:
chengsiyuan 2024-11-18 19:48:34 +08:00
parent fdc7274118
commit 1945aef5f0

View File

@ -33,10 +33,10 @@ echo "Injecting version: $VERSION"
GO_LDFLAGS="-X 'sylixos-uploader/common.Version=$VERSION'"
echo "Building with flags: $GO_LDFLAGS"
OS=linux ARCH=amd64
GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 go build -o "sylixos-uploader-${OS}-${ARCH}-${VERSION}" -ldflags "$GO_LDFLAGS"
GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 go build -o "sylixos-uploader-${OS}-${ARCH}-${VERSION}" -ldflags "-s -w $GO_LDFLAGS"
OS=linux ARCH=arm64
GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 go build -o "sylixos-uploader-${OS}-${ARCH}-${VERSION}" -ldflags "$GO_LDFLAGS"
GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 go build -o "sylixos-uploader-${OS}-${ARCH}-${VERSION}" -ldflags "-s -w $GO_LDFLAGS"
exit 0