diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index 5eba280..da07016 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -1,23 +1,72 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "title": "Build Schema",
- "$ref": "#/definitions/build",
+ "properties": {
+ "AutoDetectBranch": {
+ "type": "boolean",
+ "description": "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI"
+ },
+ "Configuration": {
+ "type": "string",
+ "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
+ "enum": [
+ "Debug",
+ "Release"
+ ]
+ },
+ "OCTOVERSION_CurrentBranch": {
+ "type": "string",
+ "description": "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch"
+ },
+ "Solution": {
+ "type": "string",
+ "description": "Path to a solution file that is automatically loaded"
+ }
+ },
"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": [
+ "CalculateVersion",
+ "Clean",
+ "Compile",
+ "CopyToLocalPackages",
+ "Pack",
+ "Restore",
+ "Test"
+ ]
+ },
+ "Verbosity": {
+ "type": "string",
+ "description": "",
+ "enum": [
+ "Verbose",
+ "Normal",
+ "Minimal",
+ "Quiet"
+ ]
+ },
+ "NukeBuild": {
"properties": {
- "AutoDetectBranch": {
- "type": "boolean",
- "description": "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI"
- },
- "Configuration": {
- "type": "string",
- "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
- "enum": [
- "Debug",
- "Release"
- ]
- },
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
@@ -27,34 +76,13 @@
"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"
- ]
+ "$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
- "OCTOVERSION_CurrentBranch": {
- "type": "string",
- "description": "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch"
- },
"Partition": {
"type": "string",
"description": "Partition to use on CI"
@@ -78,49 +106,22 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
- "type": "string",
- "enum": [
- "CalculateVersion",
- "Clean",
- "Compile",
- "CopyToLocalPackages",
- "Pack",
- "Restore",
- "Test"
- ]
+ "$ref": "#/definitions/ExecutableTarget"
}
},
- "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": [
- "CalculateVersion",
- "Clean",
- "Compile",
- "CopyToLocalPackages",
- "Pack",
- "Restore",
- "Test"
- ]
+ "$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
- "type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
- "enum": [
- "Minimal",
- "Normal",
- "Quiet",
- "Verbose"
- ]
+ "$ref": "#/definitions/Verbosity"
}
}
}
- }
-}
\ No newline at end of file
+ },
+ "$ref": "#/definitions/NukeBuild"
+}
diff --git a/build/Build.cs b/build/Build.cs
index 0d9f519..2b925aa 100644
--- a/build/Build.cs
+++ b/build/Build.cs
@@ -22,8 +22,8 @@ class Build : NukeBuild
[Parameter("Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI.")]
readonly bool AutoDetectBranch = IsLocalBuild;
- [OctoVersion(UpdateBuildNumber = true, BranchParameter = nameof(BranchName),
- AutoDetectBranchParameter = nameof(AutoDetectBranch), Framework = "net8.0")]
+ [OctoVersion(UpdateBuildNumber = true, BranchMember = nameof(BranchName),
+ AutoDetectBranchMember = nameof(AutoDetectBranch), Framework = "net8.0")]
readonly OctoVersionInfo OctoVersionInfo;
AbsolutePath SourceDirectory => RootDirectory / "source";
diff --git a/build/_build.csproj b/build/_build.csproj
index ef14edc..f076114 100644
--- a/build/_build.csproj
+++ b/build/_build.csproj
@@ -11,7 +11,7 @@
-
+