From 53141f85522404f0ac68e093ba92f2288516b715 Mon Sep 17 00:00:00 2001 From: SotoiGhost Date: Fri, 23 Aug 2019 20:26:35 -0500 Subject: [PATCH] Changed the build process --- .gitignore | 1 + azure-pipelines.yml | 2 +- build.cake | 33 +++++++++++++++------------------ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 2fea83d9..4b166057 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ build *.framework _._ externals +artifacts diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f43666d5..d7ca8945 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -88,7 +88,7 @@ jobs: dotnet tool install -g cake.tool --version $(CAKE_VERSION) displayName: 'Install .NET Core global tools' - powershell: | - dotnet-cake --target=build --verbosity=$(VERBOSITY) + dotnet-cake --target=build --sdks=$(SdksNames) --verbosity=$(VERBOSITY) displayName: 'Run build' - powershell: | if (Get-ChildItem artifacts -Filter *.nupkg) { diff --git a/build.cake b/build.cake index 2af55eee..feaa07bc 100644 --- a/build.cake +++ b/build.cake @@ -145,14 +145,13 @@ Task ("libs") CleanVisualStudioSolution (); RestoreVisualStudioSolution (); - var targets = $@"source\\{string.Join (@";source\\", SOURCES_TARGETS)}"; - - MSBuild(SOLUTION_PATH, c => { - c.Configuration = "Release"; - c.MaxCpuCount = 0; - c.Targets.Clear(); - c.Targets.Add(targets); - }); + foreach (var target in SOURCES_TARGETS) + MSBuild(SOLUTION_PATH, c => { + c.Configuration = "Release"; + c.MaxCpuCount = 0; + c.Targets.Clear(); + c.Targets.Add($@"source\\{target}"); + }); }); Task ("samples") @@ -174,16 +173,14 @@ Task ("nuget") { EnsureDirectoryExists("./artifacts"); - var targets = $@"source\\{string.Join (@":Pack;source\\", SOURCES_TARGETS)}:Pack"; - - MSBuild(SOLUTION_PATH, c => { - c.Configuration = "Release"; - c.Restore = true; - c.MaxCpuCount = 0; - c.Targets.Clear(); - c.Targets.Add(targets); - c.Properties.Add("PackageOutputPath", new [] { "../../../artifacts/" }); - }); + foreach (var target in SOURCES_TARGETS) + MSBuild(SOLUTION_PATH, c => { + c.Configuration = "Release"; + c.MaxCpuCount = 0; + c.Targets.Clear(); + c.Targets.Add($@"source\\{target}:Pack"); + c.Properties.Add("PackageOutputPath", new [] { "../../../artifacts/" }); + }); }); Task ("clean")