-
-
Save asimzeeshan/4284e13d3d519f16e2c7e028399b8941 to your computer and use it in GitHub Desktop.
Revisions
-
lukechilds created this gist
Aug 9, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ get_latest_release() { curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api grep '"tag_name":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value } # Usage # $ get_latest_release "creationix/nvm" # v0.31.4