Skip to content

Commit

Permalink
unit test for issue GitTools#1844, tests that the version is bumped a…
Browse files Browse the repository at this point in the history
…fter a prerelease tag when not doing so would put them out of order
  • Loading branch information
Jeff Walker committed Oct 8, 2019
1 parent 92c11a1 commit fdbe5b4
Showing 1 changed file with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.Collections.Generic;
using GitTools.Testing;
using NUnit.Framework;
using GitVersion.Configuration;
using GitVersion.VersioningModes;
using NUnit.Framework;

namespace GitVersionCore.Tests.IntegrationTests
{
Expand Down Expand Up @@ -34,6 +35,33 @@ public void AppliedPrereleaseTagCausesBump()
}
}

[Test]
public void AppliedPrereleaseTagAfterBranchTagCausesVersionBump()
{
var configuration = new Config
{
Branches =
{
{
"master", new BranchConfig
{
Tag = "pre",
SourceBranches = new List<string>(),
VersioningMode = VersioningMode.ContinuousDeployment,
}
}
}
};
using (var fixture = new EmptyRepositoryFixture())
{
fixture.Repository.MakeACommit();
fixture.Repository.MakeATaggedCommit("1.0.0-rc");
fixture.Repository.MakeACommit();

fixture.AssertFullSemver(configuration, "1.0.1-pre.1");
}
}

[Test]
public void CanUseCommitMessagesToBumpVersion()
{
Expand Down

0 comments on commit fdbe5b4

Please sign in to comment.