Skip to content

Instantly share code, notes, and snippets.

@michaelwoods
Created July 18, 2018 21:33
Show Gist options
  • Select an option

  • Save michaelwoods/798224b7b1eaa19f75202e34dbef59ea to your computer and use it in GitHub Desktop.

Select an option

Save michaelwoods/798224b7b1eaa19f75202e34dbef59ea to your computer and use it in GitHub Desktop.
Get latest release from provided github repo
#!/usr/bin/env bash
if [ $# -eq 0 ]; then
echo "Provide org/repo as first argument."
exit
fi
REPO=$1
curl -s "https://api.github.com/repos/${REPO}/releases/latest" | jq '.tag_name' | tr -d '"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment