@ -76,6 +76,18 @@ github_releases() (
"https://api.github.com/repos/${USER}/${REPO}/releases"
)
github_tags() (
USER=${1}
REPO=${2-}
if [ -z "${REPO}" ]; then
USER=$(echo "${1}" | sed 's|/| |g' | awk '{print $1}')
REPO=$(echo "${1}" | sed 's|/| |g' | awk '{print $2}')
fi
curl --silent --header "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${USER}/${REPO}/tags" |
jq -r '.[].name'
command_installed() (
set -ue
cmd=${1}