Skip to content

Feature branch created after finishing a release (gitflow) should inherit the develop branch version #872

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

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,43 @@ public void ShouldUseConfiguredTag(string tag, string featureName, string preRel
fixture.AssertFullSemver(config, expectedFullSemVer);
}
}

[Test]
public void BranchCreatedAfterFinishReleaseShouldInheritAndIncrementFromLastMasterCommitTag()
{
using (var fixture = new BaseGitFlowRepositoryFixture("0.1.0"))
{
//validate current version
fixture.AssertFullSemver("0.2.0-unstable.1");
fixture.Repository.CreateBranch("release/0.2.0");
fixture.Repository.Checkout("release/0.2.0");

//validate release version
fixture.AssertFullSemver("0.2.0-beta.1+0");

fixture.Checkout("master");
fixture.Repository.MergeNoFF("release/0.2.0");
fixture.Repository.ApplyTag("0.2.0");

//validate master branch version
fixture.AssertFullSemver("0.2.0");

fixture.Checkout("develop");
fixture.Repository.MergeNoFF("release/0.2.0");

fixture.Repository.MakeACommit();

//validate develop branch version after merging release 0.2.0 to master and develop (finish release)
fixture.AssertFullSemver("0.3.0-unstable.1");

//create a feature branch from develop
fixture.Repository.CreateBranch("feature/TEST-1");
fixture.Repository.Checkout("feature/TEST-1");
fixture.Repository.MakeACommit();

//I'm not entirely sure what the + value should be but I know the semvar major/minor/patch should be 0.3.0
fixture.AssertFullSemver("0.3.0-TEST-1.1+3");

}
}
}