コード例 #1
0
ファイル: GitPatcherRun.cs プロジェクト: Deigue/Synthesis
 public GitPatcherRun(
     GithubPatcherSettings settings,
     string localDir)
 {
     _localDir = localDir;
     _settings = settings;
     Name      = $"{settings.Nickname.Decorate(x => $"{x} => ")}{settings.RemoteRepoPath} => {Path.GetFileNameWithoutExtension(settings.SelectedProjectSubpath)}";
 }
コード例 #2
0
 public PatcherVm Get(PatcherSettings settings)
 {
     return(settings switch
     {
         GithubPatcherSettings git => GetGitPatcher(git),
         SolutionPatcherSettings soln => GetSolutionPatcher(soln),
         CliPatcherSettings cli => GetCliPatcher(cli),
         _ => throw new NotImplementedException(),
     });
コード例 #3
0
ファイル: GitPatcherVm.cs プロジェクト: sharpsteve/Synthesis
        public override PatcherSettings Save()
        {
            var ret = new GithubPatcherSettings
            {
                RemoteRepoPath         = RemoteRepoPathInput.RemoteRepoPath,
                ID                     = this.ID,
                SelectedProjectSubpath = this.SelectedProjectInput.ProjectSubpath,
                PatcherVersioning      = this.PatcherTargeting.PatcherVersioning,
                MutagenVersionType     = this.NugetTargeting.MutagenVersioning,
                ManualMutagenVersion   = this.NugetTargeting.ManualMutagenVersion,
                SynthesisVersionType   = this.NugetTargeting.SynthesisVersioning,
                ManualSynthesisVersion = this.NugetTargeting.ManualSynthesisVersion,
                TargetTag              = this.PatcherTargeting.TargetTag,
                TargetCommit           = this.PatcherTargeting.TargetCommit,
                LatestTag              = this.PatcherTargeting.TagAutoUpdate,
                FollowDefaultBranch    = this.PatcherTargeting.BranchFollowMain,
                AutoUpdateToBranchTip  = this.PatcherTargeting.BranchAutoUpdate,
                TargetBranch           = this.PatcherTargeting.TargetBranchName,
                LastSuccessfulRun      = this.LastSuccessfulRun,
            };

            CopyOverSave(ret);
            try
            {
                _copyOverExtraData.Copy();
            }
            catch (Exception e)
            {
                _logger.Error(e, "Failed to copy in extra data");
            }
            try
            {
                PatcherSettings.Persist();
            }
            catch (Exception e)
            {
                _logger.Error(e, "Failed to save patcher settings");
            }
            return(ret);
        }
コード例 #4
0
 public GitRemoteRepoPathInputVm(GithubPatcherSettings settings)
 {
     RemoteRepoPath = settings.RemoteRepoPath;
 }