adamtabrams / change

A simple tool that automates generating and updating a changelog
GNU General Public License v3.0
75 stars 8 forks source link

escape commit messages #23

Closed ThomasHappyHotel closed 1 week ago

ThomasHappyHotel commented 7 months ago

Topic Escape commit messages to not break sed command.

Explaination I have tried using change today at my repository. Unfortunately it was not fully possible because some old commit messages have the | character which breaks the sed command.

added 1.1.5 to CHANGELOG.md
sed: 7: "s|\(^## \[1.1.5\] -.*$\ ...": bad flag in substitute command: '?'
added 1.1.6 to CHANGELOG.md
added 1.18.5 to CHANGELOG.md
sed: 18: "s|\(^## \[1.18.5\] -.*$ ...": bad flag in substitute command: '|'
added 1.19.0 to CHANGELOG.md

Questions Ask any questions relevant to the topic.

Links Add any related links or references.

adamtabrams commented 2 weeks ago

I've added that case to the test suite, and the latest version should solve the issue.