GitVersion
GitVersion copied to clipboard
[Bug] When merging to master, sematic never increments. This also causes develop branch to go back to start of patch, but never increments and keep making previous build versions
Describe the bug Updated to latest semantic versioning, and scripts taht worked in v4 and start of v5 is now broken. Have tried my own scripts, as several other ones I have found that had previous worked (and also tried several from documentation that also seem to not work)
Example scripts: Also, same issue if i try this:
next-version: 9.0.1
mode: ContinuousDelivery
branches:
master:
regex: main
mode: ContinuousDelivery
tag:
increment: Main
prevent-increment-of-merged-branch-version: true
track-merge-target: false
feature:
regex: feature(s)?[/-]
mode: ContinuousDeployment
develop:
regex: dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: alpha
hotfix:
regex: hotfix(es)?[/-]
mode: ContinuousDeployment
tag: beta
release:
regex: release(s)?[/-]
mode: ContinuousDeployment
tag: rc
ignore:
sha: []
next-version: 9.0.1
mode: Mainline
branches:
master:
regex: master
increment: minor
develop:
tag: 'pre-release'
regex: develop
increment: patch
ignore:
sha: []
merge-message-formats: {}
With the continousDeployment, develop branch is fine, but it never increments when merging to master. In the mainline, when I merge to master, it never increments, and develop branch never increments, and goes back to it's original patch version, which I am then building versions that had already been built before.
Expected Behavior
Was hoping I could do an auto-increment on either "minor" and/or "patch" when trying to merge to master. Neither seem to work. I might be doing something wrong... though, these worked fine in start of 5.0 (and also in v4)
Actual Behavior
No matter how I merge, master is always 9.0.1. Develop, if in continuous, at least increments. If in mainline, it then starts to make build with versions that had previous been built
Possible Fix
? not sure. Maybe i'm doing something wrong?
Steps to Reproduce
Try to run the scripts above, then try to merge. Unable to increment minor/patch when merging/pr.
- Version Used: 5.8.2
- Operating System and version (Windows 10, Ubuntu 18.04): Ubuntu 18.04
- Link to your CI build (if appropriate): Above, I also tried several other examples. Hopefully, I can laugh at my stupidity, and move on.
Thanks for all help, and let me know if you need anything else.
What happens if you remove the next-version key from GitVersion.yml?
@mdg215199 Maybe this is broken in the specific GitVersion you're using. I was experiencing some odd versioning issues as well which seem to be fixed in 5.10.1.
It is not clear for me what you are actually doing, Could you please give us some steps to reproduce? Or even create a integration test with your expectation?
[Test]
public void __Just_A_Test__()
{
string yaml = @"...";
var configuration = ConfigSerializer.Read(new StringReader(yaml));
using var fixture = new EmptyRepositoryFixture();
fixture.MakeATaggedCommit("2.0.0");
// ✅ succeeds as expected
fixture.AssertFullSemver("2.0.0", configuration);
// ❌ expected: ...
fixture.AssertFullSemver("...", configuration);
}
I'm going to close this issue because of missing steps to reproduce. Please provide more information and re-open the bug if you like or create a new one. Thank you very much.