public int Execute() { var console = _serviceProvider.GetService <IConsole>(); var solutionReader = _serviceProvider.GetService <ISolutionReader>(); var differ = new GitStatusDiffer(_gitPath); console.WriteLine("Build definitions affected:"); var command = new MultiPackageVersion.Commands.Build.BuildCommand(solutionReader, differ); (bool success, var buildContext) = command.Execute(Configuration.Load("mpv.config")); buildContext.VersionConfigurationEntries .ToList() .ForEach(x => console.WriteLine(x.BuildDefinitionName)); return(success ? 0 : 1); }
public int Execute() { var console = _serviceProvider.GetService <IConsole>(); var solutionReader = _serviceProvider.GetService <ISolutionReader>(); var differ = new GitStatusDiffer(_gitPath); console.WriteLine("Files modified:"); var command = new MultiPackageVersion.Commands.Run.RunCommand(solutionReader, differ); (bool success, var results) = command.Execute(Configuration.Load("mpv.config")); results .UpdatedFiles .Select(x => $"{x.Key}\t{x.Value}") .ToList() .ForEach(x => console.WriteLine($"{x}")); return(success ? 0 : 1); }