how to use --gh-release to install specified version?
Closed this issue · 2 comments
shsh install --gh-release=0.38.0 junegunn/fzf
would still install the latest version (0.39.0
).
Or is version pinning not support so far?
it would be a great feature.
Hi @aMOPel
The --gh-release=xxxx
is used when you want to disambiguate release asset name. For example, if the release contain two asset named as ABC and DEF, you can do
shsh install --gh-release=DEF my/repo
to pick the latter.
For your usecase, you can use
shsh install --gh-release junegunn/fzf@0.38.0
to pin the version (it can either be any ref, like a release tag or commit id).
You might need to first upgrade to the latest version, with
shsh self-upgrade
because the previous version was not respecting the ref tag.
I've updated usage on readme to explain this usage.
Thank you! I eventually figured it out after reading the code a little and forgot to close this. Sorry.
I ended up forking your repo and adding a few features I was missing. I didn't make a pr since my code is rather ad hoc, but feel free to take inspiration.
https://github.com/aMOPel/shsh
[parse repository and reference when using --plain]
without this, shsh install --gh-release junegunn/fzf@0.38.0
would not work correctly. I think it would always pull the latest version or fail all together.
[added automatic searching for bash completion files when linking completion]
[added support for relative paths, when passing -v MANS=<path>]
some issues I encountered with linking
[if after extracting assets, all files are in 1 sub directory, move them 1 up]
this was necessary, since linking would fail if the archive would extract into a subdirectory. Alternatively you could adapt your linking paths.
[made asset filter for "linux" case insesitive]
so it could actually find assets with names containing Linux
etc