Skip to content

[Bug] GitVersion calculates the wrong version after main is merged back to develop #3699

@nZeus

Description

@nZeus

Describe the bug
Our config file looks like this:

branches:
  main:
    mode: ContinuousDeployment
  develop:
    mode: ContinuousDeployment
    tag: "alpha"

Imagine that we have the following tree:
image

When I run dotnet-gitversion | jq '.FullSemVer' on develop, I get the correct version:
2.0.0-alpha.1

But after I merge main to develop, I get the wrong version calculated:
image
1.1.0-alpha.3

Expected Behavior

I expect gitversion to respect commits from develop branch and calculate version 2.0.0-apha.X

Actual Behavior

Commits from develop are ignored, gitversion calculates the version from the last tag, which in this case is in the "sub-branch" of develop

Context

We have to apply an empty +semver:major commit every time main is merged back to develop.

Your Environment

  • Version Used: 5.12, and 6.0.0-bet.3
  • Operating System and version (Windows 10, Ubuntu 18.04): Windows and MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions