@@ -352,6 +352,25 @@ then
352352 $DRY_RUN git commit -s -m " Bump to next development cycle"
353353fi &&
354354
355+ # Check that release-only files were not erroneously committed.
356+ if test -z " $DRY_RUN "
357+ then
358+ debug " Verifying release-only files were not committed"
359+ for release_file in release.properties pom.xml.releaseBackup
360+ do
361+ if git diff --name-only HEAD~1 HEAD | grep -qF " $release_file "
362+ then
363+ die " FATAL: $release_file was committed to the branch!
364+ This likely means your IDE automatically staged these files.
365+ Please configure your IDE to NOT auto-stage files during the release process.
366+ You can undo this failed release with:
367+ git reset --hard HEAD~1
368+ git tag -d \$ (sed -n 's/^scm.tag=//p' < release.properties)
369+ Then try the release again after disabling IDE auto-staging."
370+ fi
371+ done
372+ fi &&
373+ 355374# Extract the name of the new tag.
356375debug " Extracting new tag name"
357376if test -z " $DRY_RUN "
0 commit comments