File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 15
15
run : echo "GORELEASER_CURRENT_TAG=v0.0.0-$(./tools/image-tag)" >> $GITHUB_ENV
16
16
- name : Set WEEKLY_IMAGE_TAG
17
17
run : echo "WEEKLY_IMAGE_TAG=$(./tools/image-tag)" >> $GITHUB_ENV
18
+ - name : Set GORELEASER_STRIP_DEBUG_INFO=false, so binaries are not stripped of debug info
19
+ run : echo "GORELEASER_STRIP_DEBUG_INFO=false" >> $GITHUB_ENV
18
20
# Forces goreleaser to use the correct previous tag for the changelog
19
21
- name : Set GORELEASER_PREVIOUS_TAG
20
22
run : echo "GORELEASER_PREVIOUS_TAG=$(git tag -l --sort=-version:refname | grep -E '^weekly-.*' | head -n 2 | tail -1)" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ version: 2
3
3
before :
4
4
hooks :
5
5
# This hook ensures that goreleaser uses the correct go version for a Pyroscope release
6
- - sh -euc "go version | grep "go version go1.21.11 " || { echo "Unexpected go version"; exit 1; }"
6
+ - sh -euc 'go version | grep "go version go1.21.11 " || { echo "Unexpected go version"; exit 1; }'
7
+ env :
8
+ # Strip debug information from the binary by default, weekly builds will have debug information
9
+ - GORELEASER_DEBUG_INFO_FLAGS={{ if and (index .Env "GORELEASER_STRIP_DEBUG_INFO") (eq .Env.GORELEASER_STRIP_DEBUG_INFO "false") }}{{ else }}-s -w{{ end }}
7
10
builds :
8
11
- env :
9
12
- CGO_ENABLED=0
@@ -26,7 +29,7 @@ builds:
26
29
- embedassets
27
30
ldflags :
28
31
- >
29
- -extldflags "-static" -s -w
32
+ -extldflags "-static" {{ .Env.GORELEASER_DEBUG_INFO_FLAGS }}
30
33
-X "github.com/grafana/pyroscope/pkg/util/build.Branch={{ .Branch }}"
31
34
-X "github.com/grafana/pyroscope/pkg/util/build.Version={{ .Version }}"
32
35
-X "github.com/grafana/pyroscope/pkg/util/build.Revision={{ .ShortCommit }}"
@@ -38,7 +41,7 @@ builds:
38
41
- netgo
39
42
ldflags :
40
43
- >
41
- -extldflags "-static" -s -w
44
+ -extldflags "-static" {{ .Env.GORELEASER_DEBUG_INFO_FLAGS }}
42
45
-X "github.com/grafana/pyroscope/pkg/util/build.Branch={{ .Branch }}"
43
46
-X "github.com/grafana/pyroscope/pkg/util/build.Version={{ .Version }}"
44
47
-X "github.com/grafana/pyroscope/pkg/util/build.Revision={{ .ShortCommit }}"
You can’t perform that action at this time.
0 commit comments