Browse Source

Get latest release from git tags

pull/5/head
Luke Childs 9 years ago
parent
commit
e0be3a1bdf
  1. 4
      zsh-nvm.plugin.zsh

4
zsh-nvm.plugin.zsh

@ -21,9 +21,7 @@ _zsh_nvm_get() {
} }
_zsh_nvm_latest_release_tag() { _zsh_nvm_latest_release_tag() {
_zsh_nvm_get "https://api.github.com/repos/creationix/nvm/releases/latest" | # Get latest release from GitHub api echo $(cd "$NVM_DIR" && git fetch --quiet origin && git describe --abbrev=0 --tags --match "v[0-9]*" origin)
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
} }
_zsh_nvm_install() { _zsh_nvm_install() {

Loading…
Cancel
Save