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

Consider pre-release tags only when they matching with the label name on branch #3441

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* Following root configuration properties have been removed:
* continuous-delivery-fallback-tag
* A new branch related property with name `track-merge-message` has been introduced. Consider we have a `main` branch and a `release/1.0.0` branch and merge changes from `release/1.0.0` to the main branch. In this scenario the merge message will be interpreted as a next version `1.0.0` when `track-merge-message` is set to `true` otherwise `0.0.1`.
* The pre-release tags are only considered when they are matching with the label name of the branch. This has an effect on the way how the `CommitCountSource` will be determined.
* The process of increasing the version with bump message when `CommitMessageIncrementing` is enabled and increment strategy is `None` has been changed.

## v5.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public void WhenDevelopHasMultipleCommitsSpecifyNonExistingCommitId()
public void WhenDevelopBranchedFromTaggedCommitOnMainVersionDoesNotChange()
{
using var fixture = new EmptyRepositoryFixture();
fixture.Repository.MakeATaggedCommit("1.0.0");
Commands.Checkout(fixture.Repository, fixture.Repository.CreateBranch("develop"));
fixture.MakeATaggedCommit("1.0.0");
fixture.BranchTo("develop");
fixture.AssertFullSemver("1.0.0");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void GitFlowMinorRelease()

// Make a commit after a tag should bump up the beta
fixture.MakeACommit();
fixture.AssertFullSemver("1.3.0-beta.2+2");
fixture.AssertFullSemver("1.3.0-beta.2+1");

// Complete release
fixture.Checkout(MainBranch);
Expand Down Expand Up @@ -191,7 +191,7 @@ public void GitFlowMajorRelease()

// Make a commit after a tag should bump up the beta
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.2+2");
fixture.AssertFullSemver("2.0.0-beta.2+1");

// Complete release
fixture.Checkout(MainBranch);
Expand Down Expand Up @@ -380,11 +380,11 @@ public void GitHubFlowMajorRelease()

// test that the CommitsSinceVersionSource should still return commit count
var version = fixture.GetVersion();
version.CommitsSinceVersionSource.ShouldBe("2");
version.CommitsSinceVersionSource.ShouldBe("0");

// Make a commit after a tag should bump up the beta
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.2+3");
fixture.AssertFullSemver("2.0.0-beta.2+1");

// Complete release
fixture.Checkout(MainBranch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void PatchLatestReleaseExample()
fixture.Repository.ApplyTag("1.2.1-beta.1");
fixture.AssertFullSemver("1.2.1-beta.1");
fixture.Repository.MakeACommit();
fixture.AssertFullSemver("1.2.1-beta.2+3");
fixture.AssertFullSemver("1.2.1-beta.2+1");

// Merge hotfix branch to main
Commands.Checkout(fixture.Repository, MainBranch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void PreventDecrementationOfVersionsOnTheDevelopmentBranch()
fixture.MergeNoFF("develop");

// ✅ succeeds as expected
fixture.AssertFullSemver("1.0.0-beta.2+2", configurationBuilder.Build());
fixture.AssertFullSemver("1.0.0-beta.2+3", configurationBuilder.Build());

fixture.Checkout("develop");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public void ShouldNotGetVersionFromFeatureBranchIfNotMerged()
fixture.MakeATaggedCommit("1.0.1-feature.1");
fixture.Checkout(MainBranch);
fixture.BranchTo("develop");
fixture.Repository.MakeACommit();
fixture.MakeACommit();

fixture.AssertFullSemver("1.0.0-alpha.1", configuration);
fixture.AssertFullSemver("1.0.0-alpha.2", configuration);

fixture.Repository.DumpGraph();
}
Expand Down
Loading