Skip to content

Commit

Permalink
goreleaser: Add missing ldflags
Browse files Browse the repository at this point in the history
Fixes kubeshark#1468

Signed-off-by: Giovanni Tirloni <[email protected]>
  • Loading branch information
gtirloni committed Dec 29, 2023
1 parent 36767ed commit 965c7d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
VER: ${{ steps.version.outputs.tag }}
BUILD_TIMESTAMP: ${{ steps.version.outputs.build_timestamp }}
GIT_BRANCH: ${{ steps.version.outputs.branch }}
COMMIT_HASH: ${{ env.GITHUB_SHA }}
10 changes: 10 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
builds:
- id: default
ldflags: |
-extldflags=-static -s -w
-X 'github.com/kubeshark/kubeshark/misc.GitCommitHash={{ .Env.COMMIT_HASH }}'
-X 'github.com/kubeshark/kubeshark/misc.Branch={{ .Env.GIT_BRANCH }}'
-X 'github.com/kubeshark/kubeshark/misc.BuildTimestamp={{ .Env.BUILD_TIMESTAMP }}'
-X 'github.com/kubeshark/kubeshark/misc.Platform={{ .Runtime.Goos }}_{{ .Runtime.Goarch }}'
-X 'github.com/kubeshark/kubeshark/misc.Ver={{ .Env.VER }}'
brews:
- name: kubeshark
homepage: https://github.com/kubeshark/kubeshark
Expand Down

0 comments on commit 965c7d1

Please sign in to comment.