Skip to content

Commit

Permalink
Updated DotNetCoreBuild inline with Tooling v1.0 #1533
Browse files Browse the repository at this point in the history
  • Loading branch information
JonCubed committed Apr 3, 2017
1 parent fb7227a commit 33f8846
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.

using Cake.Common.Tests.Fixtures.Tools.DotNetCore.Build;
using Cake.Common.Tools.DotNetCore;
using Cake.Common.Tools.DotNetCore.Build;
using Cake.Testing;
using Xunit;
Expand Down Expand Up @@ -98,12 +99,13 @@ public void Should_Add_Additional_Arguments()
fixture.Settings.Configuration = "Release";
fixture.Settings.VersionSuffix = "rc1";
fixture.Project = "./src/*";
fixture.Settings.Verbosity = DotNetCoreVerbosity.Minimal;

// When
var result = fixture.Run();

// Then
Assert.Equal("build \"./src/*\" --runtime runtime1 --framework net451 --configuration Release --version-suffix rc1", result.Args);
Assert.Equal("build \"./src/*\" --runtime runtime1 --framework net451 --configuration Release --version-suffix rc1 --verbosity Minimal", result.Args);
}

[Fact]
Expand Down Expand Up @@ -143,8 +145,6 @@ public void Should_Add_Build_Arguments()
{
// Given
var fixture = new DotNetCoreBuilderFixture();
fixture.Settings.BuildBasePath = "./temp/";
fixture.Settings.BuildProfile = true;
fixture.Settings.NoIncremental = true;
fixture.Settings.NoDependencies = true;
fixture.Project = "./src/*";
Expand All @@ -153,7 +153,7 @@ public void Should_Add_Build_Arguments()
var result = fixture.Run();

// Then
Assert.Equal("build \"./src/*\" --build-base-path \"/Working/temp\" --build-profile --no-incremental --no-dependencies", result.Args);
Assert.Equal("build \"./src/*\" --no-incremental --no-dependencies", result.Args);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ namespace Cake.Common.Tools.DotNetCore.Build
/// </summary>
public sealed class DotNetCoreBuildSettings : DotNetCoreSettings
{
/// <summary>
/// Gets or sets the directory in which to place temporary outputs.
/// </summary>
public DirectoryPath BuildBasePath { get; set; }

/// <summary>
/// Gets or sets the output directory.
/// </summary>
Expand All @@ -41,11 +36,6 @@ public sealed class DotNetCoreBuildSettings : DotNetCoreSettings
/// </summary>
public string VersionSuffix { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to print the incremental safety checks that prevent incremental compilation.
/// </summary>
public bool BuildProfile { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to mark the build as unsafe for incrementality.
/// This turns off incremental compilation and forces a clean rebuild of the project dependency graph.
Expand All @@ -57,4 +47,4 @@ public sealed class DotNetCoreBuildSettings : DotNetCoreSettings
/// </summary>
public bool NoDependencies { get; set; }
}
}
}
15 changes: 1 addition & 14 deletions src/Cake.Common/Tools/DotNetCore/Build/DotNetCoreBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ private ProcessArgumentBuilder GetArguments(string project, DotNetCoreBuildSetti
builder.AppendQuoted(settings.OutputDirectory.MakeAbsolute(_environment).FullPath);
}

// Temporary output directory
if (settings.BuildBasePath != null)
{
builder.Append("--build-base-path");
builder.AppendQuoted(settings.BuildBasePath.MakeAbsolute(_environment).FullPath);
}

// Runtime
if (!string.IsNullOrEmpty(settings.Runtime))
{
Expand Down Expand Up @@ -105,12 +98,6 @@ private ProcessArgumentBuilder GetArguments(string project, DotNetCoreBuildSetti
builder.Append(settings.VersionSuffix);
}

// Build Profile
if (settings.BuildProfile)
{
builder.Append("--build-profile");
}

// No Incremental
if (settings.NoIncremental)
{
Expand All @@ -126,4 +113,4 @@ private ProcessArgumentBuilder GetArguments(string project, DotNetCoreBuildSetti
return builder;
}
}
}
}

0 comments on commit 33f8846

Please sign in to comment.