Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8b1eabf

Browse files
committed
release-version.sh: detect external auto-staging
See mobie/mobie-viewer-fiji#1104.
1 parent 54c788f commit 8b1eabf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎release-version.sh‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,25 @@ then
352352
$DRY_RUN git commit -s -m "Bump to next development cycle"
353353
fi &&
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.
356375
debug "Extracting new tag name"
357376
if test -z "$DRY_RUN"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /