1

I've found it difficult to find a definitive answer to this question. Using Semantic Versioning and GitFlow should my release branch include the minor version number? I'm not referring to tags.

My application tags looks like this:

v1.9.1
v1.9.2
v1.9.3

I'm now ready to do a release candidate. Should my release branch in git be named v1.9-RC or v1.9.3-RC?

1 Answer 1

2

I think you are confusing Minor version and Patch version.
From http://semver.org/ :

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.

This leads to the following "rule":

  • A Release branch should contain the MAJOR and the MINOR number (e.g. release/1.9)
  • A Hotfix branch (which contains bugfixes) should also contain the PATCH number (e.g. hotfix/1.9.1).

As a side note, there is no "right" or "wrong" and semantic versioning has no knowledge of your git workflow, so in the end the only thing that matters is that you and your team can work with it.

1
  • fwiw, I also see the case of a bugfix-only release, whose branch I'm naming release-x.y.Z. It's different from a hotfix release in that release-x.y.Z branches off from develop rather than from master. afaik, SemVer PATCH versions are bugfix-only versios (which includes hotfixes). (this confused me a bit, and led me to this question.) Commented Aug 1, 2019 at 18:21

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.