-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kustomize: Fix the version string (x.y.z -> kustomize/vx.y.z) #60515
Conversation
cc: @monopole maybe you have a look and give some advice. Many thanks |
The official binary will print an actual tag ``` $ kustomize version {Version:kustomize/v3.8.1 ``` while the current binary built by Homebrew just prints `{Version:3.8.1}`. This PR will ensure that `kustomize version` command from the Homebrew binary uses the same format string. Explanation =========== The official kustomize binary is built by (google) cloud build tools. The build configuration is found at https://github.com/kubernetes-sigs/kustomize/blob/ba0f583ee5cc47ca436df1910e467613c5e04980/releasing/cloudbuild.sh#L91 This template {.Version} actually uses any current tag (e.g, kustomize/v3.8.2) https://github.com/kubernetes-sigs/kustomize/blob/ba0f583ee5cc47ca436df1910e467613c5e04980/releasing/cloudbuild.sh#L5 The build tool (goreleaser) is happy to use this non-sematic version as a specific option is used, as seen in https://github.com/kubernetes-sigs/kustomize/blob/ba0f583ee5cc47ca436df1910e467613c5e04980/releasing/cloudbuild.sh#L124 In short, the official build flag is, e.g, -X sigs.k8s.io/kustomize/api/provenance.version=kustomize/v3.8.2 not -X sigs.k8s.io/kustomize/api/provenance.version=3.8.2
7de77a2
to
c73b8c9
Compare
It looks like it's just the git tag. We could pass the output of |
Exactly.
The command will print two tags, for example
( |
Is that certainly the case? If you run |
Definitively not ;)
There is only single tag. Thanks for your pointing out. I didn't know that. (I understand that's because I have fixed in the recent commit. In the
Do you think that's fine to keep this? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @icy ! Without contributions like yours it'd be impossible to keep homebrew going with the high standards that users have come to expect from the project. You can feel good knowing that you've made the world a tiny bit better for homebrew users around the world! 👍 🎉
🤖 A scheduled task has triggered a merge. |
Thanks a lot for your approval and your feedback. I'm happy that my tiny work helps Homebrew and its users:) |
kustomize: Fix the version string (x.y.z -> kustomize/vx.y.z)
The official binary will print an actual tag
while the current binary built by Homebrew just prints
{Version:3.8.1}
.This PR will ensure that
kustomize version
command from the Homebrew binaryuses the same format string.
Explanation
The official kustomize binary is built by (google) cloud build tools.
The build configuration is found at
https://github.com/kubernetes-sigs/kustomize/blob/ba0f583ee5cc47ca436df1910e467613c5e04980/releasing/cloudbuild.sh#L91
This template {.Version} actually uses any current tag (e.g, kustomize/v3.8.2)
https://github.com/kubernetes-sigs/kustomize/blob/ba0f583ee5cc47ca436df1910e467613c5e04980/releasing/cloudbuild.sh#L5
The build tool (goreleaser) is happy to use this non-sematic version
as a specific option is used, as seen in
https://github.com/kubernetes-sigs/kustomize/blob/ba0f583ee5cc47ca436df1910e467613c5e04980/releasing/cloudbuild.sh#L124
In short, the official build flag is, e.g,
not
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?