当前位置: 首页>>代码示例>>C#>>正文


C# EmptyRepositoryFixture.BranchToFromTag方法代码示例

本文整理汇总了C#中EmptyRepositoryFixture.BranchToFromTag方法的典型用法代码示例。如果您正苦于以下问题:C# EmptyRepositoryFixture.BranchToFromTag方法的具体用法?C# EmptyRepositoryFixture.BranchToFromTag怎么用?C# EmptyRepositoryFixture.BranchToFromTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmptyRepositoryFixture的用法示例。


在下文中一共展示了EmptyRepositoryFixture.BranchToFromTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GitFlowSupportMinorRelease

    public void GitFlowSupportMinorRelease()
    {
        using (var fixture = new EmptyRepositoryFixture())
        {
            fixture.SequenceDiagram.Participant("develop");
            fixture.SequenceDiagram.Participant("master");

            fixture.Repository.MakeACommit();
            fixture.ApplyTag("1.3.0");

            // GitFlow setup
            fixture.Repository.MakeACommit();
            fixture.BranchTo("develop");
            fixture.SequenceDiagram.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.SequenceDiagram.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.SequenceDiagram.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.SequenceDiagram.Destroy("release/1.4.0");
            fixture.SequenceDiagram.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");
        }
    }
开发者ID:onovotny,项目名称:GitVersion,代码行数:42,代码来源:DocumentationSamples.cs

示例2: GitFlowSupportHotfixRelease

    public void GitFlowSupportHotfixRelease()
    {
        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.MakeACommit();
            fixture.AssertFullSemver("1.3.1+1");

            fixture.BranchTo("hotfix/1.3.1", "hotfix2");
            fixture.Activate("hotfix/1.3.1");
            fixture.MakeACommit();
            fixture.MakeACommit();
            fixture.AssertFullSemver("1.3.1-beta.1+3");

            // Apply beta.1 tag should be exact tag
            fixture.ApplyTag("1.3.1-beta.1");
            fixture.AssertFullSemver("1.3.1-beta.1");
            fixture.Checkout("support/1.x");
            fixture.MergeNoFF("hotfix/1.3.1");
            fixture.Destroy("hotfix/1.3.1");
            fixture.NoteOver("Hotfix branches are deleted once merged", "hotfix/1.3.1");
            fixture.AssertFullSemver("1.3.1+4");
            fixture.ApplyTag("1.3.1");
            fixture.AssertFullSemver("1.3.1");
        }
    }
开发者ID:TomGillen,项目名称:GitVersion,代码行数:41,代码来源:DocumentationSamples.cs


注:本文中的EmptyRepositoryFixture.BranchToFromTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。