Skip to content

Commit 245ccad

Browse files
committed
Merge branch 'hotfix/8.1.4'
2 parents 45063fd + c25e6eb commit 245ccad

9 files changed

+200
-166
lines changed

.nuke/build.schema.json

+88-82
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,5 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"properties": {
4-
"AutoStash": {
5-
"type": "boolean"
6-
},
7-
"CodecovToken": {
8-
"type": "string",
9-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
10-
},
11-
"Configuration": {
12-
"type": "string",
13-
"enum": [
14-
"Debug",
15-
"Release"
16-
]
17-
},
18-
"DiscordWebhook": {
19-
"type": "string",
20-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
21-
},
22-
"FeedzNuGetApiKey": {
23-
"type": "string",
24-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
25-
},
26-
"GitHubReleaseGitHubToken": {
27-
"type": "string",
28-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
29-
},
30-
"IgnoreFailedSources": {
31-
"type": "boolean",
32-
"description": "Ignore unreachable sources during Restore"
33-
},
34-
"Major": {
35-
"type": "boolean"
36-
},
37-
"MastodonAccessToken": {
38-
"type": "string",
39-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
40-
},
41-
"PublicNuGetApiKey": {
42-
"type": "string",
43-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
44-
},
45-
"SignPathApiToken": {
46-
"type": "string",
47-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
48-
},
49-
"SignPathSettings": {
50-
"$ref": "#/definitions/SignPathSettings"
51-
},
52-
"SlackWebhook": {
53-
"type": "string",
54-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
55-
},
56-
"Solution": {
57-
"type": "string",
58-
"description": "Path to a solution file that is automatically loaded"
59-
},
60-
"TestDegreeOfParallelism": {
61-
"type": "integer",
62-
"format": "int32"
63-
},
64-
"TwitterAccessToken": {
65-
"type": "string",
66-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
67-
},
68-
"TwitterAccessTokenSecret": {
69-
"type": "string",
70-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
71-
},
72-
"TwitterConsumerKey": {
73-
"type": "string",
74-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
75-
},
76-
"TwitterConsumerSecret": {
77-
"type": "string",
78-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
79-
},
80-
"UseHttps": {
81-
"type": "boolean"
82-
}
83-
},
843
"definitions": {
854
"Host": {
865
"type": "string",
@@ -231,5 +150,92 @@
231150
}
232151
}
233152
},
234-
"$ref": "#/definitions/NukeBuild"
153+
"allOf": [
154+
{
155+
"properties": {
156+
"AutoStash": {
157+
"type": "boolean"
158+
},
159+
"CodecovToken": {
160+
"type": "string",
161+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
162+
},
163+
"Configuration": {
164+
"type": "string",
165+
"enum": [
166+
"Debug",
167+
"Release"
168+
]
169+
},
170+
"DiscordWebhook": {
171+
"type": "string",
172+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
173+
},
174+
"FeedzNuGetApiKey": {
175+
"type": "string",
176+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
177+
},
178+
"GitHubReleaseGitHubToken": {
179+
"type": "string",
180+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
181+
},
182+
"IgnoreFailedSources": {
183+
"type": "boolean",
184+
"description": "Ignore unreachable sources during Restore"
185+
},
186+
"Major": {
187+
"type": "boolean"
188+
},
189+
"MastodonAccessToken": {
190+
"type": "string",
191+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
192+
},
193+
"PublicNuGetApiKey": {
194+
"type": "string",
195+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
196+
},
197+
"SignPathApiToken": {
198+
"type": "string",
199+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
200+
},
201+
"SignPathSettings": {
202+
"$ref": "#/definitions/SignPathSettings"
203+
},
204+
"SlackWebhook": {
205+
"type": "string",
206+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
207+
},
208+
"Solution": {
209+
"type": "string",
210+
"description": "Path to a solution file that is automatically loaded"
211+
},
212+
"TestDegreeOfParallelism": {
213+
"type": "integer",
214+
"format": "int32"
215+
},
216+
"TwitterAccessToken": {
217+
"type": "string",
218+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
219+
},
220+
"TwitterAccessTokenSecret": {
221+
"type": "string",
222+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
223+
},
224+
"TwitterConsumerKey": {
225+
"type": "string",
226+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
227+
},
228+
"TwitterConsumerSecret": {
229+
"type": "string",
230+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
231+
},
232+
"UseHttps": {
233+
"type": "boolean"
234+
}
235+
}
236+
},
237+
{
238+
"$ref": "#/definitions/NukeBuild"
239+
}
240+
]
235241
}

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [vNext]
88

9+
## [8.1.4] / 2024-11-06
10+
- Fixed `build.schema.json` generation to use `allOf` for user and base type properties
11+
912
## [8.1.3] / 2024-11-05
1013
- Fixed naming from `NukeBuild.IsSucessful` to `IsSucceeding`
1114
- Fixed `NukeBuild.IsSucceeding` to negate `IsFailing`
@@ -1171,7 +1174,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
11711174
- Added CLT tasks for Git
11721175
- Fixed background color in console output
11731176

1174-
[vNext]: https://github.com/nuke-build/nuke/compare/8.1.3...HEAD
1177+
[vNext]: https://github.com/nuke-build/nuke/compare/8.1.4...HEAD
1178+
[8.1.4]: https://github.com/nuke-build/nuke/compare/8.1.3...8.1.4
11751179
[8.1.3]: https://github.com/nuke-build/nuke/compare/8.1.2...8.1.3
11761180
[8.1.2]: https://github.com/nuke-build/nuke/compare/8.1.1...8.1.2
11771181
[8.1.1]: https://github.com/nuke-build/nuke/compare/8.1.0...8.1.1

source/Nuke.Build.Shared/CompletionUtility.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(
2929
Func<JsonProperty, bool> filter = null)
3030
{
3131
filter ??= _ => true;
32-
var definitions = schema.RootElement.GetProperty("definitions").EnumerateObject().ToDictionary(x => x.Name, x => x);
32+
var rootElement = schema.RootElement;
33+
var definitions = rootElement.GetProperty("definitions").EnumerateObject().ToDictionary(x => x.Name, x => x);
3334

34-
var parameterProperties = schema.RootElement.GetProperty("definitions").TryGetProperty("NukeBuild", out var nukebuildProperty)
35-
? nukebuildProperty.GetProperty("properties").EnumerateObject()
36-
.Concat(schema.RootElement.TryGetProperty("properties", out var properties) ? properties.EnumerateObject() : [])
35+
var parameterProperties = rootElement.GetProperty("definitions").TryGetProperty("NukeBuild", out var baseSchema)
36+
? baseSchema.GetProperty("properties").EnumerateObject()
37+
.Concat(rootElement.GetProperty("allOf")[0].TryGetProperty("properties", out var properties) ? properties.EnumerateObject() : [])
3738
: definitions["build"].Value.GetProperty("properties").EnumerateObject();
3839

3940
return parameterProperties

source/Nuke.Build.Tests/SchemaUtilityTest.TestCustomParameterAttributeAttribute.verified.json source/Nuke.Build.Tests/SchemaUtilityTest.TestCustomParameterAttribute.verified.json

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"properties": {
4-
"ComplexTypeParamWithAttribute": {
5-
"type": "string"
6-
}
7-
},
83
"definitions": {
94
"Host": {
105
"type": "string",
@@ -86,5 +81,16 @@
8681
}
8782
}
8883
},
89-
"$ref": "#/definitions/NukeBuild"
90-
}
84+
"allOf": [
85+
{
86+
"properties": {
87+
"ComplexTypeParamWithAttribute": {
88+
"type": "string"
89+
}
90+
}
91+
},
92+
{
93+
"$ref": "#/definitions/NukeBuild"
94+
}
95+
]
96+
}

source/Nuke.Build.Tests/SchemaUtilityTest.TestEmptyBuild.verified.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,10 @@
8181
}
8282
}
8383
},
84-
"$ref": "#/definitions/NukeBuild"
84+
"allOf": [
85+
{},
86+
{
87+
"$ref": "#/definitions/NukeBuild"
88+
}
89+
]
8590
}

0 commit comments

Comments
 (0)