diff --git a/etc/scripts/release.sh b/etc/scripts/release.sh index 23a4c73852b..8506eb38634 100755 --- a/etc/scripts/release.sh +++ b/etc/scripts/release.sh @@ -175,6 +175,14 @@ update_version(){ } release_build(){ + + VERSION_FROM_BRANCH_NAME=$(git branch --show-current | cut -d- -f2) + if [ "${FULL_VERSION}" != "${VERSION_FROM_BRANCH_NAME}" ]; then + echo "ERROR: version derived from pom files (${FULL_VERSION}) does not match version used in branch name (${VERSION_FROM_BRANCH_NAME})." + echo "Failing release build" + exit 1 + fi + # Do the release work in a branch local GIT_BRANCH="release/${FULL_VERSION}" git branch -D "${GIT_BRANCH}" > /dev/null 2>&1 || true