chore(changelog): fix first-letter uppercase in breaking change messages

This commit is contained in:
Marc Cornellà 2021-09-07 17:13:46 +02:00
parent f341c8c206
commit 37a60eebc1
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -294,11 +294,12 @@ function display-release {
local hash message local hash message
local wrap_width=$(( (COLUMNS < 100 ? COLUMNS : 100) - 3 )) local wrap_width=$(( (COLUMNS < 100 ? COLUMNS : 100) - 3 ))
for hash message in ${(kv)breaking}; do for hash message in ${(kv)breaking}; do
# Format the BREAKING CHANGE message by word-wrapping it at maximum 100 characters # Format the BREAKING CHANGE message by word-wrapping it at maximum 100
# (use $COLUMNS if smaller than 100), and adding a 3-space left padding. # characters (use $COLUMNS if smaller than 100)
message="$(fmt -w $wrap_width <<< "$message" | sed 's/^/ /')" message="$(fmt -w $wrap_width <<< "$message")"
# Display hash and scope first, and then the full message with newline separators # Display hash and scope in their own line, and then the full message with
echo " - $(fmt:hash) $(fmt:scope)\n\n$(fmt:subject "$message")\n" # blank lines as separators and a 3-space left padding
echo " - $(fmt:hash) $(fmt:scope)\n\n$(fmt:subject "$message" | sed 's/^/ /')\n"
done done
} }