Skip to content

Commit 9dbc30b

Browse files
committed
Run NUKE even when pack is not provided
[skip-release]
1 parent 9283045 commit 9dbc30b

File tree

2 files changed

+73
-67
lines changed

2 files changed

+73
-67
lines changed

.nuke/build.schema.json

Lines changed: 72 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,51 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"$ref": "#/definitions/build",
4-
"title": "Build Schema",
53
"definitions": {
6-
"build": {
7-
"type": "object",
4+
"Host": {
5+
"type": "string",
6+
"enum": [
7+
"AppVeyor",
8+
"AzurePipelines",
9+
"Bamboo",
10+
"Bitbucket",
11+
"Bitrise",
12+
"GitHubActions",
13+
"GitLab",
14+
"Jenkins",
15+
"Rider",
16+
"SpaceAutomation",
17+
"TeamCity",
18+
"Terminal",
19+
"TravisCI",
20+
"VisualStudio",
21+
"VSCode"
22+
]
23+
},
24+
"ExecutableTarget": {
25+
"type": "string",
26+
"enum": [
27+
"Clean",
28+
"Compile",
29+
"Coverage",
30+
"Pack",
31+
"Restore",
32+
"SetGitHubVersion",
33+
"Test",
34+
"VerifyFormat"
35+
]
36+
},
37+
"Verbosity": {
38+
"type": "string",
39+
"description": "",
40+
"enum": [
41+
"Verbose",
42+
"Normal",
43+
"Minimal",
44+
"Quiet"
45+
]
46+
},
47+
"NukeBuild": {
848
"properties": {
9-
"Configuration": {
10-
"type": "string",
11-
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
12-
"enum": [
13-
"Debug",
14-
"Release"
15-
]
16-
},
1749
"Continue": {
1850
"type": "boolean",
1951
"description": "Indicates to continue a previously failed build attempt"
@@ -23,34 +55,13 @@
2355
"description": "Shows the help text for this build assembly"
2456
},
2557
"Host": {
26-
"type": "string",
2758
"description": "Host for execution. Default is 'automatic'",
28-
"enum": [
29-
"AppVeyor",
30-
"AzurePipelines",
31-
"Bamboo",
32-
"Bitbucket",
33-
"Bitrise",
34-
"GitHubActions",
35-
"GitLab",
36-
"Jenkins",
37-
"Rider",
38-
"SpaceAutomation",
39-
"TeamCity",
40-
"Terminal",
41-
"TravisCI",
42-
"VisualStudio",
43-
"VSCode"
44-
]
59+
"$ref": "#/definitions/Host"
4560
},
4661
"NoLogo": {
4762
"type": "boolean",
4863
"description": "Disables displaying the NUKE logo"
4964
},
50-
"Package": {
51-
"type": "boolean",
52-
"description": "Whether we create the NuGet package - Default is false"
53-
},
5465
"Partition": {
5566
"type": "string",
5667
"description": "Partition to use on CI"
@@ -74,51 +85,46 @@
7485
"type": "array",
7586
"description": "List of targets to be skipped. Empty list skips all dependencies",
7687
"items": {
77-
"type": "string",
78-
"enum": [
79-
"Clean",
80-
"Compile",
81-
"Coverage",
82-
"Pack",
83-
"Restore",
84-
"SetGitHubVersion",
85-
"Test",
86-
"VerifyFormat"
87-
]
88+
"$ref": "#/definitions/ExecutableTarget"
8889
}
8990
},
90-
"Solution": {
91-
"type": "string",
92-
"description": "Path to a solution file that is automatically loaded"
93-
},
9491
"Target": {
9592
"type": "array",
9693
"description": "List of targets to be invoked. Default is '{default_target}'",
9794
"items": {
98-
"type": "string",
99-
"enum": [
100-
"Clean",
101-
"Compile",
102-
"Coverage",
103-
"Pack",
104-
"Restore",
105-
"SetGitHubVersion",
106-
"Test",
107-
"VerifyFormat"
108-
]
95+
"$ref": "#/definitions/ExecutableTarget"
10996
}
11097
},
11198
"Verbosity": {
112-
"type": "string",
11399
"description": "Logging verbosity during build execution. Default is 'Normal'",
100+
"$ref": "#/definitions/Verbosity"
101+
}
102+
}
103+
}
104+
},
105+
"allOf": [
106+
{
107+
"properties": {
108+
"Configuration": {
109+
"type": "string",
110+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
114111
"enum": [
115-
"Minimal",
116-
"Normal",
117-
"Quiet",
118-
"Verbose"
112+
"Debug",
113+
"Release"
119114
]
115+
},
116+
"Package": {
117+
"type": "boolean",
118+
"description": "Whether we create the NuGet package - Default is false"
119+
},
120+
"Solution": {
121+
"type": "string",
122+
"description": "Path to a solution file that is automatically loaded"
120123
}
121124
}
125+
},
126+
{
127+
"$ref": "#/definitions/NukeBuild"
122128
}
123-
}
129+
]
124130
}

build/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ from framework in testProject.GetTargetFrameworks()
144144

145145
Target Pack => _ => _
146146
.DependsOn(Coverage)
147-
.OnlyWhenStatic(() => Package)
147+
.OnlyWhenDynamic(() => Package)
148148
.Executes(() =>
149149
{
150150
DotNetPack(s => s

0 commit comments

Comments
 (0)