Description
Describe the bug
In a repository where commit A from develop
is merged into master
as commit B, GitVersion generates a different version for commit A if B is tagged with a version.
Expected Behavior
GitVersion produces version (5.1.0-alpha.15+Branch.develop.Sha.ffaca48e8c7bf98e28bccbec0ee8816178f78470) based on history of commit A in develop, as it does when B is not tagged.
Actual Behavior
GitVersion produces version (6.1.0-alpha.0+Branch.develop.Sha.ffaca48e8c7bf98e28bccbec0ee8816178f78470) based on the 'future' merge of A into master
as commit B with tag v6.0.0
Possible Fix
Ignore all commits derived from current commit in version calculation.
Steps to Reproduce
- Create commit A on
develop
- Run GitVersion, take note of version generated
- Merge commit A into
master
, generating commit B - Tag commit B with next release version
- Checkout
develop
(still pointing to commit A) - Run GitVersion, take note of version generated
Context
Affects builds that deploy packages when the package deployment is ran after the merge commit has also been tagged. We deploy packages using Jenkins on merge in Gerrit, so there's a fair chance of this happening on the last commits before release.
Your Environment
- Version Used: 5.10.1
- Windows 10