-
Notifications
You must be signed in to change notification settings - Fork 46
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
ability to update a dependency ref from command line #276
Comments
@schmurfy thank you for creating issue. What I could understand about the requirement is: You have vendir.yaml
now second time you want to fetch
and then run vendir sync to fetch new changes. Instead of editing vendir.yaml and then run vendir sync you want to just run It seems we want to two separate commands I feel if just editing vendir.yaml is problem then we can either use some bash script to do that or we may have a vendir flag to update vendir.yaml with new requirement and then run vendir sync. In above example we have only one directory but could have multiple and then flag will be complicated to update for multiple contents. |
I solved the problem by using ytt with an overlay which does the job well so this might be a non issue. I agree it is far easier to do this that way than having a commands which works in all cases for everyone. |
if someone else needs it, here is my ytt template: #@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "Config"})
---
directories:
#@overlay/match by=overlay.subset({"path": "mylib"})
- contents:
#@overlay/match by=overlay.index(0)
- git:
ref: #@ data.values.ref
and it can be used with: ytt -v ref=$(REV) -f vendir.yml -f vendir-change-ref.yaml |
Describe the problem/challenge you have
[A description of the current challenge that you are experiencing.]
starting from this config:
I would like to be able to do something similar to
go get mylib@v1.0.2
.Describe the solution you'd like
[A clear and concise description of what you want to happen. If applicable a visual representation of the UX.]
here are some ideas how it might look like:
after that
envdir.yaml
would containref: v1.0.2
and the lockfile would contains the sha1/revision pulled.Anything else you would like to add:
[Additional information that will assist in solving the issue.]
it would not work for every backend but it would be a great addition for faster workflow.
One usecase is pull-request, when doing pull-requests involving multiple repositories we have one pr & branch for each repository and need to switch to that branch, I would prefer a simple command line than having to edit a file. Worst case scenario I can script the file edit but it would not be my first choice.
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: