From f294b655a24919bb09767bce707ec17c34f23397 Mon Sep 17 00:00:00 2001 From: naiba Date: Thu, 29 Apr 2021 00:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20=E5=8F=96=E6=B6=88=E5=AF=B9=20mi?= =?UTF-8?q?ps64=20=E7=9A=84=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .goreleaser.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 822d4d2..24ed9a9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,8 +3,6 @@ before: - go mod tidy -v builds: - id: nezha-agent - ldflags: - - -s -w env: - CGO_ENABLED=0 goos: @@ -17,7 +15,7 @@ builds: - 386 - amd64 - mips - - mips64 + #- mips64 gomips: - softfloat ignore: @@ -27,9 +25,15 @@ builds: goarch: arm64 main: ./cmd/agent binary: nezha-agent + # 为路由器、开发板缩小二进制体积 + asmflags: + - all=-trimpath={{.Env.GOPATH}} + gcflags: + - all=-trimpath={{.Env.GOPATH}} + ldflags: + - -s -w hooks: post: - # 为路由器、开发板缩小二进制体积 - upx --best "{{.Path}}" checksum: name_template: "checksums.txt"