I'm currently in the process of implementing CD with a Feature Branch Workflow. What's unclear to me is when to increase the version number.
Shall it be increased when a new feature is created?
So let's say we have version 1.1 and I'm going to implement a new feature FB-123.
When creating the FB shall I increment the version?
*---*--- increment build number, now on 1.2.456 / increment version to 1.2 ---* 1.1
And use the Jenkins Build number for subsequent commits?
I would consider to use the following versioning schema:
git
tag<major>.<minor>.<number of commits from latest minor>-<feature branch-name>-<sha1>
<major>.<minor>
(it considers that every accepted pull request is a minor release)You can calculate the number of commits from latest minor by
git rev-list HEAD ^<latest minor tag> --ancestry-path <latest minor tag> --count
This schema will allow you to derive from the version name: