Add simple logic to skip RCs in "library/rabbitmq" after GA

This commit is contained in:
Tianon Gravi 2018-05-29 09:41:59 -07:00
parent 087a9cf605
commit 736a3b3e4d
1 changed files with 9 additions and 0 deletions

View File

@ -76,6 +76,15 @@ for version in "${versions[@]}"; do
fullVersion="$(git show "$commit":"$version/$variant/Dockerfile" | awk '$1 == "ENV" && $2 == "RABBITMQ_VERSION" { print $3; exit }')"
if [ "$rcVersion" != "$version" ] && [ -e "$rcVersion/$variant/Dockerfile" ]; then
# if this is a "-rc" release, let's make sure the release it contains isn't already GA (and thus something we should not publish anymore)
rcFullVersion="$(git show HEAD:"$rcVersion/$variant/Dockerfile" | awk '$1 == "ENV" && $2 == "RABBITMQ_VERSION" { print $3; exit }')"
if [[ "$fullVersion" == "$rcFullVersion"* ]]; then
# "x.y.z-rc1" == x.y.z*
continue
fi
fi
versionAliases=()
if [ "$version" = "$rcVersion" ]; then
while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do