Skip to content

Commit

Permalink
Add version check to release script
Browse files Browse the repository at this point in the history
  • Loading branch information
barchetta committed Mar 15, 2024
1 parent a662870 commit cc924b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions etc/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc924b9

Please sign in to comment.