Currently, the latest version is determined using git tags list independently of the current branch. This will not work for the fix branch flow. lets see in master we have tags, the minor version increases
0.3.0
0.2.0
0.1.0
And then we make a fix branch from tag 0.2.0. Where we want to increment patch version only, eg
0.2.2
0.2.1
With current code it will not work, because in fix branch it will detect 0.3.0 as the latest tag in repository.
Instead the latest version should be detected using
$ git describe --abbrev=0 --first-parent
This command ensures search only in current branch, making possible to keep versioning in fixe branches independently of master.
Currently, the latest version is determined using git tags list independently of the current branch. This will not work for the fix branch flow. lets see in master we have tags, the minor version increases
And then we make a fix branch from tag 0.2.0. Where we want to increment patch version only, eg
With current code it will not work, because in fix branch it will detect 0.3.0 as the latest tag in repository.
Instead the latest version should be detected using
This command ensures search only in current branch, making possible to keep versioning in fixe branches independently of master.
@hartym what do you think about this proposal ?