本文整理汇总了C#中EmptyRepositoryFixture.Destroy方法的典型用法代码示例。如果您正苦于以下问题:C# EmptyRepositoryFixture.Destroy方法的具体用法?C# EmptyRepositoryFixture.Destroy怎么用?C# EmptyRepositoryFixture.Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmptyRepositoryFixture
的用法示例。
在下文中一共展示了EmptyRepositoryFixture.Destroy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GitFlowHotfixBranch
public void GitFlowHotfixBranch()
{
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
fixture.Participant("develop");
fixture.Participant("master");
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.2.0");
// Create hotfix branch
fixture.Checkout("master");
fixture.BranchTo("hotfix/1.2.1", "hotfix");
fixture.Activate("hotfix/1.2.1");
fixture.MakeACommit();
fixture.MakeACommit();
fixture.AssertFullSemver("1.2.1-beta.1+2");
// Apply beta.1 tag should be exact tag
fixture.ApplyTag("1.2.1-beta.1");
fixture.AssertFullSemver("1.2.1-beta.1");
fixture.Checkout("master");
fixture.MergeNoFF("hotfix/1.2.1");
fixture.Destroy("hotfix/1.2.1");
fixture.NoteOver("Hotfix branches are deleted once merged", "hotfix/1.2.1");
fixture.ApplyTag("1.2.1");
}
}
示例2: GitFlowFeatureBranch
public void GitFlowFeatureBranch()
{
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
fixture.Participant("master");
fixture.Participant("develop");
// GitFlow setup
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.2.0");
fixture.BranchTo("develop");
// Branch to develop
fixture.MakeACommit();
fixture.AssertFullSemver("1.3.0-unstable.1");
// Open Pull Request
fixture.BranchTo("feature/myfeature", "feature");
fixture.Activate("feature/myfeature");
fixture.AssertFullSemver("1.3.0-myfeature.1+1");
fixture.MakeACommit();
fixture.AssertFullSemver("1.3.0-myfeature.1+2");
// Merge into develop
fixture.Checkout("develop");
fixture.MergeNoFF("feature/myfeature");
fixture.Destroy("feature/myfeature");
fixture.NoteOver("Feature branches should\r\n" +
"be deleted once merged", "feature/myfeature");
fixture.AssertFullSemver("1.3.0-unstable.3");
}
}
示例3: GitFlowMajorRelease
public void GitFlowMajorRelease()
{
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
fixture.Participant("master");
fixture.Participant("develop");
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.3.0");
// GitFlow setup
fixture.BranchTo("develop");
fixture.MakeACommit();
// Create release branch
fixture.BranchTo("release/2.0.0", "release");
fixture.Activate("release/2.0.0");
fixture.AssertFullSemver("2.0.0-beta.1+0");
// Make another commit on develop
fixture.Checkout("develop");
fixture.MakeACommit();
fixture.AssertFullSemver("1.4.0-unstable.2");
// Make a commit to release-2.0.0
fixture.Checkout("release/2.0.0");
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.1+1");
// Apply beta.1 tag should be exact tag
fixture.ApplyTag("2.0.0-beta.1");
fixture.AssertFullSemver("2.0.0-beta.1");
// Make a commit after a tag should bump up the beta
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.2+2");
// Complete release
fixture.Checkout("master");
fixture.MergeNoFF("release/2.0.0");
fixture.Checkout("develop");
fixture.MergeNoFF("release/2.0.0");
fixture.Destroy("release/2.0.0");
fixture.NoteOver("Release branches are deleted once merged", "release/2.0.0");
fixture.Checkout("master");
fixture.AssertFullSemver("2.0.0+0");
fixture.ApplyTag("2.0.0");
fixture.AssertFullSemver("2.0.0");
// Not 0 for commit count as we can't know the increment rules of the merged branch
fixture.Checkout("develop");
fixture.AssertFullSemver("2.1.0-unstable.2");
}
}
示例4: GitHubFlowPullRequestBranch
public void GitHubFlowPullRequestBranch()
{
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
fixture.Participant("master");
// GitFlow setup
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.2.0");
// Branch to develop
fixture.MakeACommit();
fixture.AssertFullSemver("1.2.1+1");
// Open Pull Request
fixture.BranchTo("pull/2/merge", "pr");
fixture.Activate("pull/2/merge");
fixture.AssertFullSemver("1.2.1-PullRequest.2+1");
fixture.MakeACommit();
fixture.AssertFullSemver("1.2.1-PullRequest.2+2");
// Merge into master
fixture.Checkout("master");
fixture.MergeNoFF("pull/2/merge");
fixture.Destroy("pull/2/merge");
fixture.NoteOver("Feature branches/pr's should\r\n" +
"be deleted once merged", "pull/2/merge");
fixture.AssertFullSemver("1.2.1+3");
}
}
示例5: GitHubFlowMajorRelease
public void GitHubFlowMajorRelease()
{
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
fixture.Participant("master");
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.3.0");
// Create release branch
fixture.BranchTo("release/2.0.0", "release");
fixture.Activate("release/2.0.0");
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.1+1");
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.1+2");
// Apply beta.1 tag should be exact tag
fixture.ApplyTag("2.0.0-beta.1");
fixture.AssertFullSemver("2.0.0-beta.1");
// Make a commit after a tag should bump up the beta
fixture.MakeACommit();
fixture.AssertFullSemver("2.0.0-beta.2+3");
// Complete release
fixture.Checkout("master");
fixture.MergeNoFF("release/2.0.0");
fixture.Destroy("release/2.0.0");
fixture.NoteOver("Release branches are deleted once merged", "release/2.0.0");
fixture.AssertFullSemver("2.0.0+0");
fixture.ApplyTag("2.0.0");
fixture.AssertFullSemver("2.0.0");
fixture.MakeACommit();
fixture.Repository.DumpGraph();
fixture.AssertFullSemver("2.0.1+1");
}
}
示例6: GitFlowSupportMinorRelease
public void GitFlowSupportMinorRelease()
{
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
fixture.Participant("develop");
fixture.Participant("master");
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.3.0");
// GitFlow setup
fixture.Repository.MakeACommit();
fixture.BranchTo("develop");
fixture.NoteOver("Create 2.0.0 release and complete", "develop", "master");
fixture.Checkout("master");
fixture.ApplyTag("2.0.0");
// Create hotfix branch
fixture.Checkout("1.3.0");
fixture.BranchToFromTag("support/1.x", "1.3.0", "master", "support");
fixture.NoteOver("Create 1.3.1 release and complete", "master", "support/1.x");
fixture.Repository.MakeACommit();
fixture.ApplyTag("1.3.1");
fixture.BranchTo("release/1.4.0", "supportRelease");
fixture.Activate("release/1.4.0");
fixture.MakeACommit();
fixture.MakeACommit();
fixture.AssertFullSemver("1.4.0-beta.1+2");
// Apply beta.1 tag should be exact tag
fixture.ApplyTag("1.4.0-beta.1");
fixture.AssertFullSemver("1.4.0-beta.1");
fixture.Checkout("support/1.x");
fixture.MergeNoFF("release/1.4.0");
fixture.Destroy("release/1.4.0");
fixture.NoteOver("Release branches are deleted once merged", "release/1.4.0");
fixture.AssertFullSemver("1.4.0+0");
fixture.ApplyTag("1.4.0");
fixture.AssertFullSemver("1.4.0");
}
}