Skip to content

Commit 0b148fe

Browse files
authored
chore: reduce the size by stripping debug symbols (#410)
Signed-off-by: Daniel Liszka <[email protected]>
1 parent 2e8f998 commit 0b148fe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.goreleaser.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
project_name: Chainloop
22
env:
33
- CGO_ENABLED=0
4+
- COMMON_LDFLAGS=-s -w
5+
report_sizes: true
46
builds:
57
- binary: control-plane
68
id: control-plane
79
main: ./app/controlplane/cmd
810
ldflags:
11+
- "{{ .Env.COMMON_LDFLAGS }}"
912
- -X github.com/chainloop-dev/chainloop/app/controlplane/internal/server.Version={{ .Version }}
1013
- -X main.Version={{ .Version }}
1114
targets:
@@ -14,6 +17,7 @@ builds:
1417
id: artifact-cas
1518
main: ./app/artifact-cas/cmd
1619
ldflags:
20+
- "{{ .Env.COMMON_LDFLAGS }}"
1721
- -X github.com/chainloop-dev/chainloop/app/artifact-cas/internal/server.Version={{ .Version }}
1822
- -X main.Version={{ .Version }}
1923
targets:
@@ -22,6 +26,7 @@ builds:
2226
id: cli
2327
main: ./app/cli
2428
ldflags:
29+
- "{{ .Env.COMMON_LDFLAGS }}"
2530
- -X github.com/chainloop-dev/chainloop/app/cli/cmd.Version={{ .Version }}
2631
targets:
2732
- darwin_amd64
@@ -38,11 +43,13 @@ builds:
3843
main: ./app/controlplane/plugins/core/discord-webhook/v1/cmd
3944
targets:
4045
- linux_amd64
46+
ldflags: ["{{ .Env.COMMON_LDFLAGS }}"]
4147
- binary: chainloop-plugin-smtp
4248
id: chainloop-plugin-smtp
4349
main: ./app/controlplane/plugins/core/smtp/v1/cmd
4450
targets:
4551
- linux_amd64
52+
ldflags: ["{{ .Env.COMMON_LDFLAGS }}"]
4653
- binary: chainloop-plugin-dependency-track
4754
id: chainloop-plugin-dependency-track
4855
main: ./app/controlplane/plugins/core/dependency-track/v1/cmd

0 commit comments

Comments
 (0)