public GitPatcherRun( GithubPatcherSettings settings, string localDir) { _localDir = localDir; _settings = settings; Name = $"{settings.Nickname.Decorate(x => $"{x} => ")}{settings.RemoteRepoPath} => {Path.GetFileNameWithoutExtension(settings.SelectedProjectSubpath)}"; }
public PatcherVm Get(PatcherSettings settings) { return(settings switch { GithubPatcherSettings git => GetGitPatcher(git), SolutionPatcherSettings soln => GetSolutionPatcher(soln), CliPatcherSettings cli => GetCliPatcher(cli), _ => throw new NotImplementedException(), });
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); }
public GitRemoteRepoPathInputVm(GithubPatcherSettings settings) { RemoteRepoPath = settings.RemoteRepoPath; }