scripts/github/releasetags

25 lines
438 B
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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