From b47f248d41f74e430fde71caca2aa5b35e64e3dd Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Thu, 19 Sep 2019 12:53:50 +0100 Subject: [PATCH] (GH-374) Add norestore and nobuild settings This brings consistency to how these parameters are used. Some aliases did it, others didn't. Let's rely on the Cake DAG to ensure that everything is done correctly, rather than "magic" being done. --- Cake.Recipe/Content/build.cake | 7 +++++-- Cake.Recipe/Content/nuget.cake | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cake.Recipe/Content/build.cake b/Cake.Recipe/Content/build.cake index 6e7ae132..6f8444f7 100644 --- a/Cake.Recipe/Content/build.cake +++ b/Cake.Recipe/Content/build.cake @@ -261,7 +261,8 @@ BuildParameters.Tasks.DotNetCoreBuildTask = Task("DotNetCore-Build") DotNetCoreBuild(BuildParameters.SolutionFilePath.FullPath, new DotNetCoreBuildSettings { Configuration = BuildParameters.Configuration, - MSBuildSettings = msBuildSettings + MSBuildSettings = msBuildSettings, + NoRestore = true }); CopyBuildOutput(); @@ -332,7 +333,9 @@ public void CopyBuildOutput() OutputDirectory = outputFolder.Combine(targetFramework), Framework = targetFramework, Configuration = BuildParameters.Configuration, - MSBuildSettings = msBuildSettings + MSBuildSettings = msBuildSettings, + NoRestore = true + NoBuild = true }); } } diff --git a/Cake.Recipe/Content/nuget.cake b/Cake.Recipe/Content/nuget.cake index 40d123b4..d76ca3dd 100644 --- a/Cake.Recipe/Content/nuget.cake +++ b/Cake.Recipe/Content/nuget.cake @@ -25,6 +25,7 @@ BuildParameters.Tasks.DotNetCorePackTask = Task("DotNetCore-Pack") var settings = new DotNetCorePackSettings { NoBuild = true, + NoRestore = true, Configuration = BuildParameters.Configuration, OutputDirectory = BuildParameters.Paths.Directories.NuGetPackages, MSBuildSettings = msBuildSettings,