From 20ef6d5169ead11474e131e5dde66a3c35320bc1 Mon Sep 17 00:00:00 2001 From: Julien Poissonnier Date: Tue, 26 Nov 2024 12:58:37 +0100 Subject: [PATCH] Reduce binary size by stripping debug information Strip the symbol table and DWARF debug information from the production and dev releases. Note that stack traces don't lose any information from this change. See https://github.com/pulumi/pulumi/pull/17868 --- .goreleaser.yml | 8 ++++++-- CHANGELOG.md | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index f8eb8fb801e..ffdccb5487f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,8 +16,10 @@ builds: - amd64 - arm64 mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath ldflags: - - -X github.com/pulumi/pulumi-java/pkg/version.Version={{.Tag}} + - -w -s -X github.com/pulumi/pulumi-java/pkg/version.Version={{.Tag}} - binary: pulumi-java-gen id: pulumi-java-gen @@ -34,8 +36,10 @@ builds: - amd64 - arm64 mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath ldflags: - - -X github.com/pulumi/pulumi-java/pkg/version.Version={{.Tag}} + - -w -s -X github.com/pulumi/pulumi-java/pkg/version.Version={{.Tag}} archives: - name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 2681025491f..4d231d84151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +### Unreleased + +- Reduce binary size by stripping debug information + ## 0.18.0 (2024-11-26) ### Improvements