Script to get all recents tags of a Github project

This commit is contained in:
Jeremy Gardais 2019-08-12 14:01:27 +02:00
parent 94da687ee9
commit e78527d11d
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 24 additions and 0 deletions

24
github/releasetags Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
if [ $# -ne 1 ]
then
cat << HELP
releasetags -- list all tags for a Github project.
EXAMPLE:
- List all tags for FusionInventory-agent:
releasetags https://github.com/fusioninventory/fusioninventory-agent
HELP
exit 1
fi
project="$1"
tags=$(wget -q "${project}/tags.atom" -O - | awk -v pattern="${project}/releases/tag/" -F "/" '$0~pattern { print $9 }' | sed 's/\(.*\)"/\1/')
echo "${tags}"
exit 0