CJ7
CJ7

Reputation: 23275

Source control: what version numbering should be used for branches?

If a branch is created in source control, what version number should be used if there is a release of the branched code?

eg. If the last version number was v1.2.8 and a branch is created, what should the next version numbers of the branch and the main trunk be?

Upvotes: 5

Views: 2129

Answers (2)

aleung
aleung

Reputation: 10298

In our project we follow the single release branch strategy: release will be always performed on release branch. There can be several development/feature/bug-fixing branches, but we never release the product from those branches. They will first be merged into release branch and release from release branch.

On non-release branch, SNAPSHOT version is always used (we use Maven) and the version name is the branch name . For example on a branch which names featureX, the version is featureX-SNAPSHOT. On release branch numeric version is used. Version number will be stepped in new release. In this way, we won't be bothered what version number to use in a non-release branch.

Upvotes: 2

VonC
VonC

Reputation: 1324228

It depends what the branch is for (what development effort it isolate, as described in "When should you branch")

For instance, for a fix which doesn't add any new feature, it could be v1.2.9.
But actually the version number policies are :

The important thing to remember is that a label like vx.y.z can be generated on any branch. It simply marks a stable point in the development life-cycle.

Upvotes: 4

Related Questions