Skip to content
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

[feat]: Allow specifying parts of a version #641

Open
jankatins opened this issue Feb 28, 2024 · 1 comment
Open

[feat]: Allow specifying parts of a version #641

jankatins opened this issue Feb 28, 2024 · 1 comment
Labels

Comments

@jankatins
Copy link
Contributor

If the feature request is for a plugin or theme, specify it here.

No response

If the feature solves a problem you have, specify it here.

I'm trying to install the bitwarden clie from https://github.com/bitwarden/clients/releases. Unfortunately, bitwarden mixes the releases for all their clients and I only want to consider the releases with a tag like cli-* (at the time of writing this: cli-v2024.2.0.

Describe the proposed feature.

Currently the 'ver' ICE is used verbatim. It would be nice if it could be used as prefix or regex.

Describe alternatives you've considered

zinit would fall back to an older release until a bpick is matching.

Additional context

Currently this error is shown, when using the folliwng recipe:

zinit default-ice --quiet as'null' from"gh-r" lbin'!' lucid nocompile completions
zinit lbin'!bw' bpick"bw-*.zip" ver'cli-' for @bitwarden/clients
==> Downloading bitwarden/clients
Error: gh-r: bpick ice found no release assets To fix, modify the bpick glob pattern bw-*.zip
Error: gh-r: No GitHub release assets found for cli-

If I use a full ver, it works:

zinit lbin'!bw' bpick"bw-*.zip" ver'cli-v2024.2.0' for @bitwarden/clients
==> Downloading bitwarden/clients
==> Requesting bw-macos-2024.2.0.zip
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                           ######################################################################################################################################################################################################################################################### 100.0%
[ziextract] Unpacking the files from: `bw-macos-2024.2.0.zip'
[ziextract] Successfully extracted and assigned +x chmod to the file: bw.
==> linkbin: Created bw soft link & set +x on the bw binary

Related Issues

No response

@jankatins
Copy link
Contributor Author

Another alternative: use a dynamic version: I get the current version with curl -s -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/bitwarden/clients/releases | jq -c '[.[] | select(.tag_name | contains("cli-"))] | .[0].tag_name', so if zinit update would run that again, all would be fine :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant