From e0be3a1bdf8dface07f59c0282923e08bb243a45 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 9 Aug 2016 20:54:02 +0100 Subject: [PATCH] Get latest release from git tags --- zsh-nvm.plugin.zsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index 14f0574..115fd42 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -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() {