Skip to content

Commit

Permalink
Fix setting link-time variables for release version
Browse files Browse the repository at this point in the history
The import name passed to `ldflags` was incorrect, causing variables in the `version` package to remain unset. This was causing `eksctl version` to show a `-dev` suffix for both release candidates and full releases.

This changelist fixes setting link-time variables for the release version.
  • Loading branch information
cPu1 committed Jul 24, 2023
1 parent 34fc38c commit 6c67b6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/eksctl-io/eksctl/pkg/version.buildDate={{.Date}} -X github.com/eksctl-io/eksctl/pkg/version.gitCommit={{.ShortCommit}}
- -s -w -X github.com/weaveworks/eksctl/pkg/version.buildDate={{.Date}} -X github.com/weaveworks/eksctl/pkg/version.gitCommit={{.ShortCommit}}
goos:
- windows
- darwin
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
- CGO_ENABLED=0
ldflags:
# gitTag set from a generated file (see ./tag_release.sh)
- -s -w -X github.com/eksctl-io/eksctl/pkg/version.buildDate={{.Date}} -X github.com/eksctl-io/eksctl/pkg/version.gitCommit={{.ShortCommit}} -X github.com/eksctl-io/eksctl/pkg/version.PreReleaseID={{.Env.PRE_RELEASE_ID}}
- -s -w -X github.com/weaveworks/eksctl/pkg/version.buildDate={{.Date}} -X github.com/weaveworks/eksctl/pkg/version.gitCommit={{.ShortCommit}} -X github.com/weaveworks/eksctl/pkg/version.PreReleaseID={{.Env.PRE_RELEASE_ID}}
goos:
- windows
- darwin
Expand Down

0 comments on commit 6c67b6d

Please sign in to comment.