Open drzero42 opened 3 years ago
Anything we can do to make it possible to install releases from such repos?
This is going to be very tricky.. since if repo use any convention that they want it's going to be very difficult for us to be able to do something about it. I believe not even github thought about this use-case of one repository having multiple releases of multiple projects.
I saw this in the past but I've decided not to do so anything about it since it's the only case that I came across so far. If you have any simple
way of fixing this I'm happy to hear options, but otherwise, I don't even think it's worth investing the time to fix this only case.
My first thought was that since the repo uses tagging that contains names of the releases (ie. kustomize
and kyaml
) we could allow setting a prefix for tags. That unfortunately probably won't work as the "latest release" only points to whatever was released last, switching between different products, so there won't always be a kustomize
release marked as "latest release".
Can bin
figure out the latest version aside from what is marked as "latest release"?
Can
bin
figure out the latest version aside from what is marked as "latest release"?
Yes, we can do this since the GH releases API returns the releases ordered by date. The "problem" with this is that we'll have to supply some sort of prefix to bin install / update
to let it know from which release we want to pick the binaries from. This is the part that I don't like for the following reasons:
If we install things with bin install --prefix kustomize/ <repo_url>
that means that bin will have to save the prefix in the config and use it on every update. If this is the case and the repo decides to use a different release name for whatever reason, then bin update
will just break :(
Based on 1, if we decide not to persist the prefix, then the UX around bin update
will be completely broken as there will be some binaries which can't be updated.
I'd like to provide a "nice" alternative for this, but so far the only case where this has happened is the kustomize repo. Not sure if it makes sense to invest the time in fixing ATM.
Scenario:
So
bin
runs into problems when a repo releases multiple different things, which is fair I guess. Anything we can do to make it possible to install releases from such repos?