Do not open the editor when finishing the release

`git flow release finish` opened the editor three times, and the content was
never edited: twice for the merge commits, where the message generated by git is
always kept, and once for the message of the annotated tag, where a placeholder
was typed by hand. The last tags carry the message "tag" for that reason.

GIT_MERGE_AUTOEDIT=no keeps the merge messages git already generates, and -m
provides the tag message. git flow appends the tag name to that message, so the
tag of the next release will read "Release v26.09.0".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-08-27 14:58:39 +02:00
parent 4996819812
commit 8645260d46
+4 -1
View File
@@ -188,7 +188,10 @@ git commit -a -m "Adding fastlane file for version ${version}"
printf "\n================================================================================\n"
printf "OK, finishing the release...\n"
git flow release finish "${version}"
# GIT_MERGE_AUTOEDIT avoids opening the editor for the 2 merge commits, whose default message is
# always used, and -m provides the message of the annotated tag. git flow appends the tag name to
# it, so the tag message ends up being "Release v${version}".
GIT_MERGE_AUTOEDIT=no git flow release finish -m "Release" "${version}"
printf "\n================================================================================\n"
read -r -p "Done, push the branch 'main' and the new tag (yes/no) default to yes? " doPush