-
Notifications
You must be signed in to change notification settings - Fork 243
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
Git inputs cannot reference tags with the ref option #2932
Labels
Bug
Something isn't working
Comments
I can reproduce this with:
The same works when I use
Thank you for reporting, we'll look into this. |
bufdev
changed the title
git inputs:
Git inputs cannot reference tags with the ref option
May 18, 2024
ref
option should allow branches and tags
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I understand, git branches and tags are types of git refs (they are stored under
.git/refs
).IMO it should therefore be possible to use the
ref
option as a generic way for referencing commits, branches, and tags.This is actually stated in the documentation:
https://buf.build/docs/reference/inputs#other-options
However, while
git checkout remote-tag
is working,buf generate "ssh://[email protected]/path-to-repo.git#ref=remote-tag"
is not.IMO this feature would make parameterizing CI pipelines easier, e.g.:
ssh://[email protected]/path-to-repo.git#ref=develop
- build against latest changes on the develop branchssh://[email protected]/path-to-repo.git#ref=v1.0.0
- build against a stable release tagNote: this is also how kubectl kustomize is implementing the
ref
option:https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md#remote-directories
The text was updated successfully, but these errors were encountered: