25 lines
438 B
Plaintext
25 lines
438 B
Plaintext
|
#!/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
|