fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
888 B

#!/bin/bash
# compose: no-hooks
## List upstream available versions in reverse chronological order
##
## These versions information will be the input for the version
## information usually used by the build process.
##
## A external query of upstream sources will be done.
##
## By default, limit should be 1 (the latest version)
usage="$exname [-h|--help] [-l|--limit <limit>]"
version_limit=5
while [ "$1" ]; do
case "$1" in
"--help"|"-h")
print_usage
exit 0
;;
"--limit"|"-l")
version_limit="$2"
shift
;;
*)
err "Unexpected argument '$1'."
exit 1
;;
esac
shift
done
set -e
DOCKER_IMAGE_NAME=rocketchat/rocket.chat
docker-tags-fetch "$DOCKER_IMAGE_NAME" -l "20" -f "^[0-9]+\.[0-9]+\.[0-9]+$" |
sort -rV |
head -n "${version_limit}"