Member-only story
How to Write a Bash Script to Create and Update a Changelog
No more generators, logs, or dependencies

A changelog is a useful tool to show other contributors and users what updates were made to your project, when, as well as what those updates entail. While you might think that keeping a changelog is tedious or time consuming, it can be more informative and improve accountability in the long run.
That being said, it would be nice to trim some of the time spent on your changelog if you could. That’s what I wanted to do when I created my own bash script for creating and updating my own changelog.
There are a few pre-existing ways to generate a changelog, but they either didn’t quite match what I was looking for in terms of clarity (including the version number provided by git tagging for example), or they encompassed too much information. What I mean by too much information is that these other generation methods grabbed ALL of your commits from your git logs and essentially listed them in a more organized manner.
This is a nice trick to know, but I wanted to create a more deliberate changelog and not simply re-organize my various commits.
“The purpose of a changelog entry is to document the noteworthy difference, often across multiple commits, to communicate them clearly to end users.”
— Keep A Changelog
Our changelog
Having our own script for generating a changelog allows the flexibility to decide what information is included as well as how it should look. In this post, we will generate a changelog that has the basic structure that looks like the following.

The changelog for your project doesn’t HAVE to look like this but I like it as it follows the Keep A Changelog convention and provides a good amount of information without being overwhelming. Each point of the changelog contains the version number, followed by the date in ISO format. Under each is a section pertaining…