Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 262 Bytes

get-latest-github-tag-number.md

File metadata and controls

7 lines (5 loc) · 262 Bytes

Get the latest version (tag) number from a Github repository

For example the docker-compose repository:

curl -s https://api.github.com/repos/docker/compose/releases/latest | awk -F\: '/tag_name/ { print gensub(/.*"([^"]+)".*/,"\\1","g",$2) }'