18.10.2018

Last Updated on

All things considering you are probably using git to version your changes, if not here is a quick-start guide.

You see I am a bit punctual towards my code and documenting its changes, I write extensive commit messages however I’m extremely reluctant to write changelogs for clients or users. Well, let’s automatize.

Change changelogs

Photo by Kat Yukawa on Unsplash

Prerequisite

Fix your commit aesthetic. This will make the next parts waaay easier

  1. Write a thorough explanation in “subject” part of your commit — in a manner of which user can easily understand.
  2. Specify things you had to change in a developer-to-developer manner under that.

First-word tag

“Tagging” your commits will make it easy to sort and filter, not speaking about the uniformity of final changelog. I kind of settled on these few words as a leading tag:

  1. Added
  2. Fixed
  3. Removed
  4. Updated

This should categorize your commits in a way user can understand in a final list of changes.

Commit with leading tag would look like so:

Added ‘foo’ so users can do ‘bar’ fixing ‘baz’ in the process

Tools that suit you

I originally made myself a dumb little tool that pulled all the changes from my git repository and formatted it based on actual version tags. It only takes few lines of code and can be executed literally in every pre/post build process in virtually any IDE or CLI.

That was obviously not enough, as I like to put it, it sucked. So I googled more and found countless command line tools that ran either in bash or Go. I figured that Go is the way to go (pun intended) and focused on researching that.

In a few minutes, I found a precious thing. It has plenty of options, can run literally everywhere and the result is customizable to the bone.

CI

My another requirement was that it must run in a CI environment. Because committing your changelog with every release is a really dumb thing to do.

My CI provider (Bitrise) is having no issues with that, allowing me to install everything I desire even having Go preinstalled on the Ubuntu system image for some reason.

So I ran the initial configuration again to ensure it creates the template I want, clearing everything beforehand. Then you can start to customize it to your liking.

Deployment?

There are several things you can do. Preferably you should deploy generated file to your product’s website, however, you can choose a more verbose way to do it — Github gist. It has its own API so it shouldn’t be anything hard to do.

Most of the mobile app developers will want to use the store’s integrated changelog. For this I have no automatization, you’ll probably have to cherry pick commits by hand or have PR department completely redo it for you.

 

If you are into programming, do not hesitate and contact us. We tend to look for Android dev (iOS as well), but there are also chances for a project manager or a tester.

Viktor De Pasquale