mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-01-30 09:47:14 +08:00
Get latest release from git tags
This commit is contained in:
parent
0ccae77ce2
commit
e0be3a1bdf
@ -21,9 +21,7 @@ _zsh_nvm_get() {
|
||||
}
|
||||
|
||||
_zsh_nvm_latest_release_tag() {
|
||||
_zsh_nvm_get "https://api.github.com/repos/creationix/nvm/releases/latest" | # Get latest release from GitHub api
|
||||
grep '"tag_name":' | # Get tag line
|
||||
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
|
||||
echo $(cd "$NVM_DIR" && git fetch --quiet origin && git describe --abbrev=0 --tags --match "v[0-9]*" origin)
|
||||
}
|
||||
|
||||
_zsh_nvm_install() {
|
||||
|
Loading…
Reference in New Issue
Block a user