Skip to content

Commit

Permalink
Rebase and conflict resolvement
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Mar 19, 2023
1 parent a5a04ca commit 9851b43
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 35 deletions.
14 changes: 6 additions & 8 deletions src/GitVersion.Core.Tests/IntegrationTests/DevelopScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,13 +560,11 @@ public void PreventDecrementationOfVersionsOnTheMainBranch()
[Test]
public void ShouldProvideTheCorrectVersionEvenIfPreReleaseLabelExistsInTheGitTag()
{
using (var fixture = new EmptyRepositoryFixture())
{
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.0.0-oreo.1");
fixture.BranchTo("develop");
fixture.Repository.MakeACommit();
fixture.AssertFullSemver("1.1.0-alpha.1");
}
using var fixture = new EmptyRepositoryFixture();
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.0.0-oreo.1");
fixture.BranchTo("develop");
fixture.Repository.MakeACommit();
fixture.AssertFullSemver("1.1.0-alpha.1");
}
}
45 changes: 18 additions & 27 deletions src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,32 +410,23 @@ public void TrackMergeMessageShouldBeConsideredOnTheMainBranch(bool trackMergeMe
[Test]
public void ShouldProvideTheCorrectVersionEvenIfPreReleaseLabelExistsInTheGitTag()
{
var config = new Config
{
NextVersion = "5.0",
Branches =
{
{
"master", new BranchConfig
{
Regex = "master",
Tag = "beta",
Increment = IncrementStrategy.Patch,
VersioningMode = VersioningMode.ContinuousDeployment
}
}
}
};
using (var fixture = new EmptyRepositoryFixture())
{
fixture.Repository.MakeACommit();
fixture.AssertFullSemver(config, "5.0.0-beta.0"); // why not "5.0.0-beta.1"?
fixture.Repository.MakeACommit();
fixture.AssertFullSemver(config, "5.0.0-beta.1");
fixture.Repository.MakeATaggedCommit("v5.0.0-rc.1");
fixture.AssertFullSemver(config, "5.0.0-rc.1");
fixture.Repository.MakeACommit();
fixture.AssertFullSemver(config, "5.0.1-beta.1"); // test fails here, it generates "5.0.0-beta.1" which is not unique and lower than "5.0.0-rc.1"
}
var configuration = GitFlowConfigurationBuilder.New
.WithSemanticVersionFormat(SemanticVersionFormat.Loose)
.WithNextVersion("5.0")
.WithBranch("main",
branchBuilder => branchBuilder.WithLabel("beta")
.WithIncrement(IncrementStrategy.Patch)
.WithVersioningMode(VersioningMode.ContinuousDeployment))
.Build();

using EmptyRepositoryFixture fixture = new("main");
fixture.Repository.MakeACommit();
fixture.AssertFullSemver("5.0.0-beta.0", configuration); // why not "5.0.0-beta.1"?
fixture.Repository.MakeACommit();
fixture.AssertFullSemver("5.0.0-beta.1", configuration);
fixture.Repository.MakeATaggedCommit("v5.0.0-rc.1");
fixture.AssertFullSemver("5.0.0-rc.1", configuration);
fixture.Repository.MakeACommit();
fixture.AssertFullSemver("5.0.1-beta.1", configuration); // test fails here, it generates "5.0.0-beta.1" which is not unique and lower than "5.0.0-rc.1"
}
}

0 comments on commit 9851b43

Please sign in to comment.