diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index 3f82f382c..1e6b805de 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -1,21 +1,51 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/build",
- "title": "Build Schema",
"definitions": {
- "build": {
- "type": "object",
+ "Host": {
+ "type": "string",
+ "enum": [
+ "AppVeyor",
+ "AzurePipelines",
+ "Bamboo",
+ "Bitbucket",
+ "Bitrise",
+ "GitHubActions",
+ "GitLab",
+ "Jenkins",
+ "Rider",
+ "SpaceAutomation",
+ "TeamCity",
+ "Terminal",
+ "TravisCI",
+ "VisualStudio",
+ "VSCode"
+ ]
+ },
+ "ExecutableTarget": {
+ "type": "string",
+ "enum": [
+ "BuildInstaller",
+ "BundleApp",
+ "Clean",
+ "Compile",
+ "NuGetPack",
+ "Publish",
+ "Restore",
+ "Zip"
+ ]
+ },
+ "Verbosity": {
+ "type": "string",
+ "description": "",
+ "enum": [
+ "Verbose",
+ "Normal",
+ "Minimal",
+ "Quiet"
+ ]
+ },
+ "NukeBuild": {
"properties": {
- "AssemblyVersion": {
- "type": "string"
- },
- "Configuration": {
- "type": "string",
- "enum": [
- "Debug",
- "Release"
- ]
- },
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
@@ -25,28 +55,8 @@
"description": "Shows the help text for this build assembly"
},
"Host": {
- "type": "string",
"description": "Host for execution. Default is 'automatic'",
- "enum": [
- "AppVeyor",
- "AzurePipelines",
- "Bamboo",
- "Bitbucket",
- "Bitrise",
- "GitHubActions",
- "GitLab",
- "Jenkins",
- "Rider",
- "SpaceAutomation",
- "TeamCity",
- "Terminal",
- "TravisCI",
- "VisualStudio",
- "VSCode"
- ]
- },
- "InformationalVersion": {
- "type": "string"
+ "$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
@@ -71,6 +81,43 @@
"type": "string",
"description": "Root directory during build execution"
},
+ "Skip": {
+ "type": "array",
+ "description": "List of targets to be skipped. Empty list skips all dependencies",
+ "items": {
+ "$ref": "#/definitions/ExecutableTarget"
+ }
+ },
+ "Target": {
+ "type": "array",
+ "description": "List of targets to be invoked. Default is '{default_target}'",
+ "items": {
+ "$ref": "#/definitions/ExecutableTarget"
+ }
+ },
+ "Verbosity": {
+ "description": "Logging verbosity during build execution. Default is 'Normal'",
+ "$ref": "#/definitions/Verbosity"
+ }
+ }
+ }
+ },
+ "allOf": [
+ {
+ "properties": {
+ "AssemblyVersion": {
+ "type": "string"
+ },
+ "Configuration": {
+ "type": "string",
+ "enum": [
+ "Debug",
+ "Release"
+ ]
+ },
+ "InformationalVersion": {
+ "type": "string"
+ },
"Runtime": {
"type": "string",
"enum": [
@@ -86,58 +133,17 @@
"SelfContained": {
"type": "boolean"
},
- "Skip": {
- "type": "array",
- "description": "List of targets to be skipped. Empty list skips all dependencies",
- "items": {
- "type": "string",
- "enum": [
- "BuildInstaller",
- "BundleApp",
- "Clean",
- "Compile",
- "NuGetPack",
- "Publish",
- "Restore",
- "Zip"
- ]
- }
- },
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
- "Target": {
- "type": "array",
- "description": "List of targets to be invoked. Default is '{default_target}'",
- "items": {
- "type": "string",
- "enum": [
- "BuildInstaller",
- "BundleApp",
- "Clean",
- "Compile",
- "NuGetPack",
- "Publish",
- "Restore",
- "Zip"
- ]
- }
- },
- "Verbosity": {
- "type": "string",
- "description": "Logging verbosity during build execution. Default is 'Normal'",
- "enum": [
- "Minimal",
- "Normal",
- "Quiet",
- "Verbose"
- ]
- },
"Version": {
"type": "string"
}
}
+ },
+ {
+ "$ref": "#/definitions/NukeBuild"
}
- }
+ ]
}
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 3b05d5e5f..db300b80c 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -45,12 +45,12 @@
-
+
-
+
@@ -84,4 +84,4 @@
-
+
\ No newline at end of file
diff --git a/nukebuild/Build.cs b/nukebuild/Build.cs
index e1db1ec79..67fa5976d 100644
--- a/nukebuild/Build.cs
+++ b/nukebuild/Build.cs
@@ -80,9 +80,9 @@ private string GetTFM()
DotNetPublish(s => s
.EnableNoRestore()
- .When(Runtime != null, s => s.SetRuntime(Runtime).SetSelfContained(SelfContained))
- .When(Runtime == RuntimeIdentifier.win_x64, s => s.SetFramework($"{tfm}-windows"))
- .When(Runtime != RuntimeIdentifier.win_x64, s => s.SetFramework(tfm))
+ .When(_ => Runtime != null, s => s.SetRuntime(Runtime).SetSelfContained(SelfContained))
+ .When(_ => Runtime == RuntimeIdentifier.win_x64, s => s.SetFramework($"{tfm}-windows"))
+ .When(_ => Runtime != RuntimeIdentifier.win_x64, s => s.SetFramework(tfm))
.SetConfiguration(Configuration)
.SetVersions(Version, AssemblyVersion, InformationalVersion)
.SetProject(mainProj)
@@ -100,9 +100,9 @@ private string GetTFM()
{
AbsolutePath output = OutputDirectory / item;
DotNetPublish(s => s
- .When(Runtime != null, s => s.SetRuntime(Runtime).SetSelfContained(SelfContained))
- .When(Runtime == RuntimeIdentifier.win_x64, s => s.SetFramework($"{tfm}-windows"))
- .When(Runtime != RuntimeIdentifier.win_x64, s => s.SetFramework(tfm))
+ .When(_ => Runtime != null, s => s.SetRuntime(Runtime).SetSelfContained(SelfContained))
+ .When(_ => Runtime == RuntimeIdentifier.win_x64, s => s.SetFramework($"{tfm}-windows"))
+ .When(_ => Runtime != RuntimeIdentifier.win_x64, s => s.SetFramework(tfm))
.EnableNoRestore()
.SetConfiguration(Configuration)
.SetVersions(Version, AssemblyVersion, InformationalVersion)
@@ -111,7 +111,7 @@ private string GetTFM()
output.GlobFiles($"**/{item}*")
.Select(p => (Source: p, Target: mainOutput / output.GetRelativePathTo(p)))
- .ForEach(t => CopyFile(t.Source, t.Target));
+ .ForEach(t => t.Source.Copy(t.Target));
}
string[] asmsToCopy =
@@ -129,7 +129,7 @@ private string GetTFM()
AbsolutePath output = OutputDirectory / asm;
output.GlobFiles($"**/{asm}.*")
.Select(p => (Source: p, Target: mainOutput / output.GetRelativePathTo(p)))
- .ForEach(t => CopyFile(t.Source, t.Target));
+ .ForEach(t => t.Source.Copy(t.Target));
}
}
});
diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj
index 4b6edd4ed..4d29093b5 100644
--- a/nukebuild/_build.csproj
+++ b/nukebuild/_build.csproj
@@ -9,7 +9,6 @@
..
1
true
- true