bin icon indicating copy to clipboard operation
bin copied to clipboard

Add support for tag patterns (aka "I'd like to install kustomize using bin")

Open larsks opened this issue 3 years ago • 4 comments

I would like to use bin to install the latest version of kustomize. The releases page hosts multiple packages; the kustomize releases are tagged with kustomize/<version>.

I can install a specific version of kustomize by running something like:

bin install github.com/kubernetes-sigs/kustomize/releases/tag/kustomize/v4.5.7

But I don't always know the latest version. I'd like to be able to run:

bin install github.com/kubernetes-sigs/kustomize/releases/tag/kustomize/\*

And have it install the latest release matching that tag.

larsks avatar Oct 24 '22 02:10 larsks

agree that it'd be great to support this. I thinking making it at the URL level will be a bit tricky though. How about something like:

bin install -f ^kustomize.* https://github.com/kubernetes-sigs/kustomize`

-f will act as a filter and will only consider releases where the filter regex matches. Thoughts?

marcosnils avatar Oct 24 '22 15:10 marcosnils

I think that would be a fantastic solution!

larsks avatar Oct 24 '22 16:10 larsks

@marcosnils -f acts as --force in the install cmd.

What about using -e and --regexp as the filtering flag?

For example:

bin install -e ^kustomize.* https://github.com/kubernetes-sigs/kustomize

or

bin install --regexp ^kustomize.* https://github.com/kubernetes-sigs/kustomize

Stavrospanakakis avatar Oct 27 '22 17:10 Stavrospanakakis

SGTM I realized about this afterwards when starting to implement it. Using -e and --expr sounds like a better flag

marcosnils avatar Oct 27 '22 17:10 marcosnils