yannh / kubeconform

A FAST Kubernetes manifests validator, with support for Custom Resources!
Apache License 2.0
2.15k stars 121 forks source link

Version information rendered by `-v` flag is off #185

Closed bmuschko closed 1 year ago

bmuschko commented 1 year ago

I installed the latest version of kubeconform from Homebrew. Rendering the version information points to development. Shouldn't this render the latest final version e.g. v0.6.1?

$ kubeconform -v

development
yannh commented 1 year ago

It should, thanks for noticing! It looks like I broke this 2 years ago when refactoring the CI pipeline...

bmuschko commented 1 year ago

Creating the binary locally works fine with the GoReleaser binary 1.16.2. The generated binary indicates the correct version provided by the ldflags option.

$ git checkout v0.6.1
$ goreleaser build
$ dist/kubeconform_darwin_amd64_v1/kubeconform -v
v0.6.1

Is there maybe something off with running GoReleaser in a Docker container here?

yannh commented 1 year ago

@bmuschko It looks like Homebrew recompiles kubeconform from sources https://github.com/Homebrew/homebrew-core/blob/5bfcb5ec2b72344e8bb82d173ad09c737ace9ce7/Formula/kubeconform.rb#L22

I'd suggest opening a bug against homebrew-core - the build command line would need to include -X main.version=0.6.1