Adding target to get the latest mmctl release from GitHub (#13770)

* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir
Этот коммит содержится в:
Jason Paul Deland
2020-02-03 16:58:15 -05:00
коммит произвёл GitHub
родитель d7206d2ede
Коммит acce0da068
3 изменённых файлов: 51 добавлений и 3 удалений

14
scripts/get_latest_release.sh Исполняемый файл
Просмотреть файл

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Time: 2020-01-29 14:49:24
# Author: https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
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
# Assume we are in a git dir
get_latest_release $1