Skip to content

Commit 4bd034b

Browse files
committed
release-version.sh: verify that maven-release-plugin did its job
Under circumstances yet to be determined, maven-release-plugin fails to adjust the <version> tag to the correct release version, then fails to notice that and make an incorrect tag (still referencing the SNAPSHOT version), and finally fails to commit and push changes bumping to the next release cycle. Detect that situation and fail. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 71645bd commit 4bd034b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

release-version.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ $DRY_RUN mvn $BATCH_MODE release:prepare -DpushChanges=false -Dresume=false $TAG
123123
$PROFILE $DEV_VERSION -DreleaseVersion="$VERSION" \
124124
"-Darguments=${EXTRA_ARGS# }" &&
125125

126-
# Squash the two commits on the current branch into one
126+
# Squash the two commits on the current branch produced by the
127+
# maven-release-plugin into one
128+
test "[maven-release-plugin] prepare for next development iteration" = \
129+
"$(git show -s --format=%s HEAD)" ||
130+
die "maven-release-plugin's commits are unexpectedly missing!"
127131
$DRY_RUN git reset --soft HEAD^^ &&
128132
if ! git diff-index --cached --quiet --ignore-submodules HEAD --
129133
then

0 commit comments

Comments
 (0)