For a number of reasons (some historical, some legacy, some just daft), the optional Interlok components live in various git providers. This isn’t a post that argues that git flow is great; it’s well understood so we use it to remove the friction of understanding a bespoke tagging/branching system. When we do a product release there’s a Jenkins pipeline that builds all the artefacts based on the release branch from
git flow release. That means that when we decide that it’s time to prepare for a release, we have to do a git release start on every project and publish that branch; all of which is nice and scriptable.
Sadly though, when we do a
git flow release finish, things aren’t that simple as git flow finish does like to have a merge message when you merge into both the master and develop branch. The beauty of git is that all these sub-commands are just shell scripts so all we need to do is patch
git-flow-release so that we don’t have to enter a merge message when that part of the pipeline fires.
First of all, we add a new function to git-flow-common that generates the merge message (available as a diff).
Then we need to patch the
cmd_finish function in git-flow-release so that when a merge is attempted on both the
develop branches (so it may be 2 places you make some changes). In the end it’ll look something like this (available as a diff) :
Finally you need to modify your local git config so that you define the merge message :