Merge pull request #91 from badcel/BuildScriptParameter

Respect configuration parameter
This commit is contained in:
Harry 2019-05-21 19:48:23 +02:00 committed by GitHub
commit 76cbe40848
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ Settings.Cake = Context;
Settings.Version = "3.22.24.30"; Settings.Version = "3.22.24.30";
Settings.BuildTarget = Argument("BuildTarget", "Default"); Settings.BuildTarget = Argument("BuildTarget", "Default");
Settings.Assembly = Argument("Assembly", ""); Settings.Assembly = Argument("Assembly", "");
var configuration = Argument("Configuration", "Release");
var msbuildsettings = new DotNetCoreMSBuildSettings(); var msbuildsettings = new DotNetCoreMSBuildSettings();
var list = new List<GAssembly>(); var list = new List<GAssembly>();
@ -42,7 +43,7 @@ Task("Prepare")
DotNetCoreRestore("Source/Tools/Tools.sln"); DotNetCoreRestore("Source/Tools/Tools.sln");
DotNetCoreBuild("Source/Tools/Tools.sln", new DotNetCoreBuildSettings { DotNetCoreBuild("Source/Tools/Tools.sln", new DotNetCoreBuildSettings {
Verbosity = DotNetCoreVerbosity.Minimal, Verbosity = DotNetCoreVerbosity.Minimal,
Configuration = "Release" Configuration = configuration
}); });
// Generate code and prepare libs projects // Generate code and prepare libs projects
@ -75,7 +76,7 @@ Task("Build")
{ {
var settings = new DotNetCoreBuildSettings var settings = new DotNetCoreBuildSettings
{ {
Configuration = "Release", Configuration = configuration,
MSBuildSettings = msbuildsettings MSBuildSettings = msbuildsettings
}; };
@ -94,7 +95,7 @@ Task("RunSamples")
{ {
var settings = new DotNetCoreBuildSettings var settings = new DotNetCoreBuildSettings
{ {
Configuration = "Release", Configuration = configuration,
MSBuildSettings = msbuildsettings MSBuildSettings = msbuildsettings
}; };
@ -109,7 +110,7 @@ Task("PackageNuGet")
var settings = new DotNetCorePackSettings var settings = new DotNetCorePackSettings
{ {
MSBuildSettings = msbuildsettings, MSBuildSettings = msbuildsettings,
Configuration = "Release", Configuration = configuration,
OutputDirectory = "BuildOutput/NugetPackages", OutputDirectory = "BuildOutput/NugetPackages",
NoBuild = true, NoBuild = true,
@ -160,7 +161,7 @@ Task("PackageAddin")
// Build MonoDevelop addin // Build MonoDevelop addin
var msbuildsettings = new MSBuildSettings var msbuildsettings = new MSBuildSettings
{ {
Configuration = "Release", Configuration = configuration,
}; };
msbuildsettings = msbuildsettings.WithProperty("Version", Settings.Version); msbuildsettings = msbuildsettings.WithProperty("Version", Settings.Version);
msbuildsettings = msbuildsettings.WithProperty("MDBinDir", "/opt/MonoDevelop/bin/"); msbuildsettings = msbuildsettings.WithProperty("MDBinDir", "/opt/MonoDevelop/bin/");