public DotNetCliCommandResult AddPackages()
        {
            var executionTime = new TimeSpan(0);
            var stdOutput     = new StringBuilder();

            foreach (var cmd in GetAddPackagesCommands(BuildPartition))
            {
                var result = DotNetCliCommandExecutor.Execute(WithArguments(cmd));
                if (!result.IsSuccess)
                {
                    return(result);
                }
                executionTime += result.ExecutionTime;
                stdOutput.Append(result.StandardOutput);
            }
            return(DotNetCliCommandResult.Success(executionTime, stdOutput.ToString()));
        }
示例#2
0
 public DotNetCliCommandResult Publish()
 => DotNetCliCommandExecutor.Execute(WithArguments(
                                         GetPublishCommand(BuildPartition, Arguments)));
示例#3
0
 public DotNetCliCommandResult BuildNoDependencies()
 => DotNetCliCommandExecutor.Execute(WithArguments(
                                         GetBuildCommand(BuildPartition, $"{Arguments} --no-dependencies")));
示例#4
0
 public DotNetCliCommandResult Restore()
 => DotNetCliCommandExecutor.Execute(WithArguments(
                                         GetRestoreCommand(GenerateResult.ArtifactsPaths, BuildPartition, Arguments)));
 public DotNetCliCommandResult PublishNoBuildAndNoRestore()
 => DotNetCliCommandExecutor.Execute(WithArguments(
                                         GetPublishCommand(BuildPartition, $"{Arguments} --no-build --no-restore")));
 public DotNetCliCommandResult BuildNoRestore()
 => DotNetCliCommandExecutor.Execute(WithArguments(
                                         GetBuildCommand(BuildPartition, $"{Arguments} --no-restore")));
 public DotNetCliCommandResult BuildNoRestoreNoDependencies()
 => DotNetCliCommandExecutor.Execute(WithArguments(
                                         GetBuildCommand(GenerateResult.ArtifactsPaths, BuildPartition, $"{Arguments} --no-restore --no-dependencies")));