zyedidia / eget

Easily install prebuilt binaries from GitHub.
MIT License
866 stars 39 forks source link

Add a "tag pattern" parameter for repositories that host multiple packages #56

Closed larsks closed 1 year ago

larsks commented 1 year ago

I'd like to install kustomize from https://github.com/kubernetes-sigs/kustomize/releases, but this fails:

$ eget kubernetes-sigs/kustomize --to ~/bin
no candidates found

If I specify an explicit tag it works:

$ eget kubernetes-sigs/kustomize --to ~/bin/ -t kustomize/v4.5.7
https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz
Downloading 100% [=============================================================================================================================================================] (5.5/5.5 MB, 14.692 MB/s)
Extracted `kustomize` to `/home/lars/bin/kustomize`

It would be nice for this sort of repository if I could specify a tag pattern, so that I could run something like:

$ eget kubernetes-sigs/kustomize --to ~/bin --tag-pattern 'kustomize/.*'

And have eget get the latest release that matches the given tag pattern.

patinthehat commented 1 year ago

I've run into this issue as well, and would find this feature useful.

zyedidia commented 1 year ago

I suppose one solution might be to have the current tag to act as a "contains" match if it doesn't directly match anything. So if -t kustomize doesn't directly match a tag, then it will look for any tags that contain kustomize and take the most recent one.

zyedidia commented 1 year ago

This is now implemented as described above.