Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] next-version on Mainline #2661

Closed
td0wn opened this issue Apr 15, 2021 · 1 comment
Closed

[Bug] next-version on Mainline #2661

td0wn opened this issue Apr 15, 2021 · 1 comment
Labels

Comments

@td0wn
Copy link

td0wn commented Apr 15, 2021

Describe the bug
Setting next-version prevents Mainline mode from counting direct & merge commits when computing the version, since the changes in commit c701080, I believe.

Expected Behavior

The next-version setting should affect only the baseline version and the commit traversal in Mainline mode should still be executed, as was the previous behavior.

Actual Behavior

No commits are traversed/recognized as bumping the version so the next-version is just used as the computed version.

Prior to this change the next-version setting was used just for determining the baseline version, but now that setting is being consulted for commit traversal in Mainline mode and resulting in different behavior. I don't think this was intentional?

Possible Fix

Don't check for next-version being null/empty when deciding whether to walk the commit graph in Mainline mode. Basically I don't think this conditional check should be there: https://github.com/GitTools/GitVersion/blob/main/src/GitVersion.Core/VersionCalculation/MainlineVersionCalculator.cs#L55

Context

Computed version when in Mainline mode and setting next-version results in different values when upgrading to versions released after c701080 merged.

Your Environment

  • Version Used: 5.6.4
  • Operating System and version (Windows 10, Ubuntu 18.04): Windows 10 & Ubuntu 20.04
@td0wn td0wn added the bug label Apr 15, 2021
@asbjornu
Copy link
Member

asbjornu commented Apr 15, 2021

Duplicate of #2441. Please remove next-version and add a git tag with the same version number, on the appropriate commit.

@asbjornu asbjornu changed the title [Bug] [Bug] next-version on Mainline Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants