Browse Source

pass dotnet build command arguments without double quotes

pull/5418/head
İsmail ÇAĞDAŞ 6 years ago
parent
commit
179bff9b0f
  1. 25
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs

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

@ -3,6 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Cli.Utils; using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -29,16 +30,17 @@ namespace Volo.Abp.Cli.Build
{ {
continue; continue;
} }
foreach (var projectDependency in project.Dependencies)
{
if (builtProjects.Contains(project.CsProjPath))
{
continue;
}
BuildInternal(projectDependency, arguments, builtProjects); Parallel.ForEach(
} project.Dependencies,
new ParallelOptions {MaxDegreeOfParallelism = maxParallelBuildCount},
(projectDependency) =>
{
if (!builtProjects.Contains(project.CsProjPath))
{
BuildInternal(projectDependency, arguments, builtProjects);
}
});
} }
} }
catch (Exception e) catch (Exception e)
@ -51,10 +53,11 @@ namespace Volo.Abp.Cli.Build
private void BuildInternal(DotNetProjectInfo project, string arguments, ConcurrentBag<string> builtProjects) private void BuildInternal(DotNetProjectInfo project, string arguments, ConcurrentBag<string> builtProjects)
{ {
Console.WriteLine("Building...: dotnet build " + project.CsProjPath + " " + arguments); var buildArguments = arguments.TrimStart('"').TrimEnd('"');
Console.WriteLine("Building...: dotnet build " + project.CsProjPath + " " + buildArguments);
var output = CmdHelper.RunCmdAndGetOutput( var output = CmdHelper.RunCmdAndGetOutput(
"dotnet build " + project.CsProjPath + " " + arguments, "dotnet build " + project.CsProjPath + " " + buildArguments,
out int buildStatus out int buildStatus
); );

Loading…
Cancel
Save