if [[ "$BRANCH" == "master" ]]; then
DOCKER_TAG="latest"
elif [[ -n "${RELEASE_VERSION-}" ]]; then
- DOCKER_TAG=${BRANCH##*/}.${RELEASE_VERSION}
- # e.g. danube.1.0, danube.2.0, danube.3.0
+ DOCKER_TAG=${RELEASE_VERSION}
+ if git checkout ${RELEASE_VERSION}; then
+ echo "Successfully checked out the git tag ${RELEASE_VERSION}"
+ else
+ echo "The tag ${RELEASE_VERSION} doesn't exist in the repository. Existing tags are:"
+ git tag
+ exit 1
+ fi
else
DOCKER_TAG="stable"
fi