diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-12-30 20:02:24 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-12-30 20:02:24 +0100 |
commit | a4a79eaa8cdf39f35dcd1753b973e830ff7b00b8 (patch) | |
tree | 38d3aa01b1d6afc7c93c0b681055eeb786399cd3 /tools | |
parent | a251233bec17829eb46825157258219474b79c5c (diff) | |
download | zsh-a4a79eaa8cdf39f35dcd1753b973e830ff7b00b8.tar.gz zsh-a4a79eaa8cdf39f35dcd1753b973e830ff7b00b8.tar.bz2 zsh-a4a79eaa8cdf39f35dcd1753b973e830ff7b00b8.zip |
fix(changelog): remove CR characters in breaking change messages
The GitHub UI might not remove CR characters from commit description forms
filled from a Windows browser.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/changelog.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/changelog.sh b/tools/changelog.sh index 8753212e9..634b61d01 100755 --- a/tools/changelog.sh +++ b/tools/changelog.sh @@ -91,6 +91,8 @@ function parse-commit { if [[ "$body" =~ "BREAKING CHANGE: (.*)" || \ "$subject" =~ '^[^ :\)]+\)?!: (.*)$' ]]; then message="${match[1]}" + # remove CR characters (might be inserted in GitHub UI commit description form) + message="${message//$'\r'/}" # skip next paragraphs (separated by two newlines or more) message="${message%%$'\n\n'*}" # ... and replace newlines with spaces |