GitTools/GitVersion

[ISSUE]: Wrong minor version

Closed this issue · 6 comments

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.Tool

GitVersion version

6.0.2

Operating system

Linux

What are you seeing?

MajorMinorPatch: 0.0.1

What is expected?

MajorMinorPatch: 0.1.0

Steps to Reproduce

just get the MajorMinorPatch: 0.1.0

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

No response

That was a breaking change in 6.x we introduced, @HHobeck can you elaborate on this one?

Sorry I don't understand this issue. Please express your scenario in a understandable and meaningful way. Just saying to expect a number instead of another number is not constructive.

Thank you.

Hello @HHobeck
When I use version 5.x and get the value of "MajorMinorPatch" I usually get the value 0.1.0, now when using the version 6.x, the value I get is 0.0.1.

Hello @HHobeck When I use version 5.x and get the value of "MajorMinorPatch" I usually get the value 0.1.0, now when using the version 6.x, the value I get is 0.0.1.

Yes that is correct. In the breaking change document you will find the following explanation:

The fallback version strategy now returns 0.0.0 and is flagged with ShouldIncrement equal to true. This yields the version 0.1.0 on the develop branch (IncrementStrategy.Minor by default) and 0.0.1 on the main branch (IncremetnStrategy.Patch by default).

Thanks, last question, how would I make sure it is 0.1.0 on my feature branches?

workflow: GitFlow/v1
branches:
  feature:
    increment: minor