Script to get all recents tags of a Github project
This commit is contained in:
parent
94da687ee9
commit
e78527d11d
|
@ -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
|
Loading…
Reference in New Issue