gitflow icon indicating copy to clipboard operation
gitflow copied to clipboard

Multiline release tag messages cause problems

Open shaedrich opened this issue 2 years ago • 0 comments

I was unable to use gitflow to include release notes/a change log. This is what I tried:

git flow release finish 1.0.0 --pushdevelop --pushtag --pushproduction -m "Tagging 1.0.0
>>
>> # [CHANGED]
>> - Something has changed
>>
>> # [FIXED]
>> - Something has been fixed"

Multiple -m don't work either:

git flow release finish 1.0.0 --pushdevelop --pushtag --pushproduction -m "Tagging 1.0.0" -m "# [CHANGED]
>> - Something has changed
>>
>> # [FIXED]
>> - Something has been fixed"

Solution

add -subject and -body to your command: https://github.com/nvie/gitflow/blob/develop/git-flow-release#L251:


			[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
			[ "$FLAGS_subject" != "" && "$FLAGS_body" ] && opts="$opts -m '$FLAGS_subject' -m '$FLAGS_body'"

Another solution would be to fix whatever causes strange results with multiline tag messages

shaedrich avatar May 31 '22 08:05 shaedrich