// TODO: DryRun? public void Execute() { var version = ComponentVersion.Undefined; if (!String.IsNullOrEmpty(VersionString)) { Console.WriteLine("Release for all SNAPSHOT projects in folder {0} to release version {1}", Path, VersionString); version = new ComponentVersion(VersionString); } else { Console.WriteLine("Release for all SNAPSHOT projects in folder {0} with build {1} and \"{2}\" suffix", Path, Build, Suffix); } var solutionManagement = new SolutionManagement(GetActionLog()); var solution = solutionManagement.OpenSolution(Path, LoadAllProjects); Debug.WriteLine(solution.AllProjects.Count() + " projects loaded"); BulkSwitchToReleaseAction action = version.IsDefined ? new BulkSwitchToReleaseAction(solution, version) : new BulkSwitchToReleaseAction(solution, Build, Suffix); action.Execute(); solution.ForceSaveAll(); }
public void Execute() { if (Data == null || !Data.Contains("=")) { Console.Error.WriteLine("Define name=value parameter"); return; } var split = Data.Split(new[] { '=' }); if (split.Length != 2) { Console.Error.WriteLine("Define name=value parameter"); return; } string name = split[0]; string value = split[1]; Console.WriteLine("Apply value \"{0}\" to property \"{1}\"", value, name); var solutionManagement = new SolutionManagement(GetActionLog()); var solution = solutionManagement.OpenSolution(Path, LoadAllProjects); ApplyClassifierAction action = new ApplyClassifierAction(solution, name, value); action.Execute(); solution.ForceSaveAll(); }
private void OpenTree(object sender, EventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); if (dialog.ShowDialog() != DialogResult.OK) { return; } try { _solution = _solutionManagement.OpenSolution(dialog.SelectedPath); } catch (Exception ex) { ShowError(ex.ToString(), ErrorsResources.ErrorLoadingProjectTree); } RefreshUI(); }
// TODO: use current folder to identify project if current folder is under repo public void Execute() { var solutionManagement = new SolutionManagement(GetActionLog()); var solution = solutionManagement.OpenSolution(Path, LoadAllProjects); IProject target; if (!solution.TryGetProject(GroupId, ArtifactId, Version, out target, !string.IsNullOrEmpty(Version))) { Console.Error.WriteLine("Could not find project"); return; } Console.WriteLine("Switch to SNAPSHOT project {0} and all dependent in folder {1}", target, Path); if (Position != -1) { Console.WriteLine($"Increment {Position} position"); } else { Console.WriteLine("Increment last version position"); } Debug.WriteLine(solution.AllProjects.Count() + " projects loaded"); CascadeSwitchAction cascade = new CascadeSwitchAction(solution); int?position = null; if (Position >= 0) { position = Position; } int?stopAtPosition = null; if (Position >= 0) { stopAtPosition = StopAtPosition; if (!position.HasValue) { Console.Error.WriteLine("Position has to be specified"); return; } if (position.Value > StopAtPosition) { Console.Error.WriteLine("Stop position has to be less or equal to position"); return; } } cascade.ExecuteFor(target, position, stopAtPosition); solution.ForceSaveAll(); }
public void Execute() { Console.WriteLine("Normalizing format for all projects in folder {0}", Path); var solutionManagement = new SolutionManagement(GetActionLog()); var solution = solutionManagement.OpenSolution(Path, LoadAllProjects); Debug.WriteLine(solution.AllProjects.Count() + " projects loaded"); solution.ForceSaveAll(); }
public void Execute() { var solutionManagement = new SolutionManagement(GetActionLog()); var solution = solutionManagement.OpenSolution(Path, LoadAllProjects); DumpClassifiersAction action = new DumpClassifiersAction(solution); var result = action.Execute(); foreach (string classifier in result) { Console.WriteLine(classifier); } }
// TODO: DryRun public void Execute() { var solutionManagement = new SolutionManagement(GetActionLog()); var solution = solutionManagement.OpenSolution(Path, LoadAllProjects); ValidateTreeStructureAction action = new ValidateTreeStructureAction(solution); var problems = action.Execute().ToList(); foreach (var problem in problems) { Console.WriteLine("{0,-10} {1}\t{2}", GetTitle(problem), problem.ProjectReference, problem.Description); } Console.WriteLine("{0} projects validated", solution.AllProjects.Count()); Console.WriteLine("{0} problems found", problems.Count()); // TODO: need to save fixes solution.ForceSaveAll(); }