rajatjindal / kubectl-whoami

This plugin gets the subject name using the effective kubeconfig
Apache License 2.0
120 stars 14 forks source link

Set version during build #11

Closed olivierlemasle closed 3 years ago

olivierlemasle commented 3 years ago

Fixes #8

I dont't really know GoReleaser but this seems to do the trick. Tested with goreleaser --snapshot --skip-publish --rm-dist.

olivierlemasle commented 3 years ago

NB: as documented, default value for ldflags is:

-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser

so I've just adapted to the right version parameter.

rajatjindal commented 3 years ago

thanks a lot for the PR.