Handle Release Candidate branches

pull/30/head
Peter Smythe 2023-09-30 15:50:49 +02:00 committed by Jody Garnett
parent d151510c1e
commit 66456cdf83
1 changed files with 17 additions and 11 deletions

View File

@ -9,7 +9,7 @@ function usage() {
echo "$0 <mode> <version> [<build>]" echo "$0 <mode> <version> [<build>]"
echo "" echo ""
echo " mode : The mode. Choose one of 'build', 'publish' or 'buildandpublish'" echo " mode : The mode. Choose one of 'build', 'publish' or 'buildandpublish'"
echo " version : The released version to build an docker image for (eg: 2.23.1, ${MAIN}-SNAPSHOT)" echo " version : The released version to build an docker image for (eg: 2.23.1, ${MAIN}-SNAPSHOT, ${MAIN}-RC)"
echo " build : Build number (optional)" echo " build : Build number (optional)"
} }
@ -26,6 +26,11 @@ else
BUILD=$3 BUILD=$3
fi fi
if [[ "$VERSION" == *"-RC"* ]]; then
# release candidate branch release
BRANCH="${VERSION:0:4}-RC"
TAG=geoserver-docker.osgeo.org/geoserver:$BRANCH
else
if [[ "${VERSION:0:4}" == "$MAIN" ]]; then if [[ "${VERSION:0:4}" == "$MAIN" ]]; then
# main branch snapshot release # main branch snapshot release
BRANCH=main BRANCH=main
@ -40,6 +45,7 @@ else
TAG=geoserver-docker.osgeo.org/geoserver:$VERSION TAG=geoserver-docker.osgeo.org/geoserver:$VERSION
fi fi
fi fi
fi
echo "Release from branch $BRANCH GeoServer $VERSION as $TAG" echo "Release from branch $BRANCH GeoServer $VERSION as $TAG"