Skip to content

Commit

Permalink
Build with NUKE even when pack not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielweyer committed Dec 21, 2024
1 parent 428b50f commit cce8d83
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 67 deletions.
138 changes: 72 additions & 66 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +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": [
"Clean",
"Compile",
"Coverage",
"Pack",
"Restore",
"SetGitHubVersion",
"Test",
"VerifyFormat"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"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"
Expand All @@ -23,34 +55,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"
},
"Package": {
"type": "boolean",
"description": "Whether we create the NuGet package - Default is false"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
Expand All @@ -74,51 +85,46 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Coverage",
"Pack",
"Restore",
"SetGitHubVersion",
"Test",
"VerifyFormat"
]
"$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": [
"Clean",
"Compile",
"Coverage",
"Pack",
"Restore",
"SetGitHubVersion",
"Test",
"VerifyFormat"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
"Debug",
"Release"
]
},
"Package": {
"type": "boolean",
"description": "Whether we create the NuGet package - Default is false"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
2 changes: 1 addition & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ from framework in testProject.GetTargetFrameworks()

Target Pack => _ => _
.DependsOn(Coverage)
.OnlyWhenStatic(() => Package)
.OnlyWhenDynamic(() => Package)
.Executes(() =>
{
DotNetPack(s => s
Expand Down

0 comments on commit cce8d83

Please sign in to comment.