I came across the idea to generate Changelogs for my projects.
But it must match the following rules:
- Don’t Repeat Yourself: generate Changelogs automatically, not manually. Because generating Changelogs manually is too much effort.
- Use Git commit messages, but not all of them. Use only selected messages.
So I coded a simple Bash script that filters all Git commit messages containing #RN
. Which stands for ReleaseNote. For example:
Feature XYZ added. #RN
The script uses Git Tags to grep all commits between the second to last to the last tag.
You get a file (for example CHANGELOG-v1.1.0.txt
) something like this:
2015-06-19 13:38:59 CEST
Version 1.1.0
Changes since v1.0.0
- Feature XYZ added.
- Tests added.
Don’t forget to add CHANGELOG-*.txt
to your projects .gitignore
file.