From c368c2a4d7fcc9b2e1c263b90885835eda0c9520 Mon Sep 17 00:00:00 2001 From: srinandan <13950006+srinandan@users.noreply.github.com> Date: Sat, 3 Dec 2022 10:54:27 -0800 Subject: [PATCH] reduce bin size #126 --- .goreleaser.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 4c51bf95c..9a4b7946d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -33,10 +33,11 @@ builds: - -trimpath ldflags: - -s -w -a -extldflags "-static" -X main.Version={{.Tag}} -X main.Git={{.Commit}} + gcflags: + - all="-l" env: - CGO_ENABLED=0 - # hooks: #disabling upx for linux temporarily - # post: upx "{{ .Path }}" + - id: apigeeclimac main: ./main.go binary: apigeecli @@ -49,11 +50,11 @@ builds: - -trimpath ldflags: - -s -w -a -extldflags "-static" -X main.Version={{.Tag}} -X main.Git={{.Commit}} + gcflags: + - all="-l" env: - CGO_ENABLED=0 - # hooks: #disabling upx for mac temporarily - # post: upx "{{ .Path }}" -# Windows defender can have a false positive and think upx shrinked binaries are malware + - id: apigeecliwin main: ./main.go binary: apigeecli @@ -61,13 +62,12 @@ builds: - windows goarch: - amd64 - ignore: - - goos: windows - goarch: arm64 flags: - -trimpath ldflags: - - -s -w -a -extldflags "-static" -X main.Version={{.Tag}} -X main.Git={{.Commit}} + - -s -w -a -extldflags "-static" -X main.Version={{.Tag}} -X main.Git={{.Commit}} + gcflags: + - all="-l" env: - CGO_ENABLED=0 @@ -104,10 +104,4 @@ signs: release: draft: true - prerelease: true - -universal_binaries: - - - replace: false - ids: - - apigeeclimac \ No newline at end of file + prerelease: true \ No newline at end of file