Skip to content

Incorrect calculated version on new branch without any commits #1289

@Jericho

Description

@Jericho

Here's an issue I am experiencing when building on AppVeyor but I am unable to reproduce locally.

Let's say the current build number is 0.4.2, let's also say that every push triggers a build on AppVeyor and finally let's say that a step in the build script uses GitVersion to calculate the build version.

Repro steps

  • Create a new branch, say release/0.4.3
  • Push to GitHub
  • Check your AppVeyor build. The calculated version is 0.5.0 which is incorrect
  • Here's an example that demonstrates this incorrect result

Steps to restore expected behavior

  • Commit a change to the new branch
  • Push to GitHub
  • Check your AppVeyor build. The calculated version is 0.4.3 which is correct
  • Here's an example that demonstrates this result.

I'm guessing GitVersion is confused because the latest commit on the new branch is the same as the latest on the develop branch, but that's just a guess on my part.

I have confirmed this incorrect behavior with GitVersion 3.6.2 I'll double check and confirm if 4.0 beta also suffers from this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions