Created
January 21, 2019 09:36
-
-
Save sparkstar/0af9ac8c820e33f590ea1b692ec82aba to your computer and use it in GitHub Desktop.
get latest releases version(tag) from github repository
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 characters
#!/bin/sh | |
# get latest releases version(tag) from github repository | |
# $ ./latest.sh neovim/neovim | |
# v0.3.4 | |
# $ ./latest.sh tus/tusd | |
# 0.11.0 | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | grep "tag_name" | sed -E 's/.*\:\s\"(.*)\",*/\1/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment