Browse Source

removed max-parallel-builds option

pull/5418/head
İsmail ÇAĞDAŞ 6 years ago
parent
commit
40d3f38410
  1. 1
      docs/en/CLI.md
  2. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs
  3. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/IDotNetProjectBuilder.cs
  4. 15
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/BuildCommand.cs

1
docs/en/CLI.md

@ -443,6 +443,5 @@ abp build [options]
* ```--working-directory``` or ```-w```: Specifies the working directory. This option is useful when the command is executed outside of a GIT repository or when executing directory doesn't contain a .NET solution file. * ```--working-directory``` or ```-w```: Specifies the working directory. This option is useful when the command is executed outside of a GIT repository or when executing directory doesn't contain a .NET solution file.
* ```--build-name``` or ```-n```: Specifies a name for the build. This option is useful when same repository is used for more than one different builds. * ```--build-name``` or ```-n```: Specifies a name for the build. This option is useful when same repository is used for more than one different builds.
* ```--dotnet-build-arguments``` or ```-a```: Arguments to pass ```dotnet build``` when building project files. * ```--dotnet-build-arguments``` or ```-a```: Arguments to pass ```dotnet build``` when building project files.
* ```--max-parallel-builds``` or ```-m```: Max parallel build count when building child projects of a project.
* ```--force```: Forces to build projects even they are not changed from the last successful build. * ```--force```: Forces to build projects even they are not changed from the last successful build.

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs

@ -9,7 +9,7 @@ namespace Volo.Abp.Cli.Build
{ {
public class DefaultDotNetProjectBuilder : IDotNetProjectBuilder, ITransientDependency public class DefaultDotNetProjectBuilder : IDotNetProjectBuilder, ITransientDependency
{ {
public List<string> Build(List<DotNetProjectInfo> projects, int maxParallelBuildCount, string arguments) public List<string> Build(List<DotNetProjectInfo> projects, string arguments)
{ {
var builtProjects = new ConcurrentBag<string>(); var builtProjects = new ConcurrentBag<string>();
var totalProjectCountToBuild = projects.Count; var totalProjectCountToBuild = projects.Count;

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/IDotNetProjectBuilder.cs

@ -4,6 +4,6 @@ namespace Volo.Abp.Cli.Build
{ {
public interface IDotNetProjectBuilder public interface IDotNetProjectBuilder
{ {
List<string> Build(List<DotNetProjectInfo> projects, int maxParallelBuildCount, string arguments); List<string> Build(List<DotNetProjectInfo> projects, string arguments);
} }
} }

15
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/BuildCommand.cs

@ -35,11 +35,6 @@ namespace Volo.Abp.Cli.Commands
Options.WorkingDirectory.Long Options.WorkingDirectory.Long
); );
var maxParallelBuild = commandLineArgs.Options.GetOrNull(
Options.MaxParallelBuild.Short,
Options.MaxParallelBuild.Long
);
var dotnetBuildArguments = commandLineArgs.Options.GetOrNull( var dotnetBuildArguments = commandLineArgs.Options.GetOrNull(
Options.DotnetBuildArguments.Short, Options.DotnetBuildArguments.Short,
Options.DotnetBuildArguments.Long Options.DotnetBuildArguments.Long
@ -59,13 +54,9 @@ namespace Volo.Abp.Cli.Commands
Console.WriteLine("Finding changed projects..."); Console.WriteLine("Finding changed projects...");
var changedProjectFiles = ChangedProjectFinder.Find(buildConfig); var changedProjectFiles = ChangedProjectFinder.Find(buildConfig);
Console.WriteLine(sw.ElapsedMilliseconds + " ms passed...");
sw.Restart();
var buildSucceededProjects = DotNetProjectBuilder.Build( var buildSucceededProjects = DotNetProjectBuilder.Build(
changedProjectFiles, changedProjectFiles,
string.IsNullOrEmpty(maxParallelBuild) ? 1 : Convert.ToInt32(maxParallelBuild),
dotnetBuildArguments ?? "" dotnetBuildArguments ?? ""
); );
@ -118,12 +109,6 @@ namespace Volo.Abp.Cli.Commands
public const string Long = "working-directory"; public const string Long = "working-directory";
} }
public static class MaxParallelBuild
{
public const string Short = "m";
public const string Long = "max-parallel-builds";
}
public static class DotnetBuildArguments public static class DotnetBuildArguments
{ {
public const string Short = "a"; public const string Short = "a";

Loading…
Cancel
Save