Skip to content

Commit

Permalink
Merge branch 'hotfix/8.1.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Nov 6, 2024
2 parents dc902f8 + c25e6eb commit a36819c
Show file tree
Hide file tree
Showing 9 changed files with 200 additions and 166 deletions.
170 changes: 88 additions & 82 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,86 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"AutoStash": {
"type": "boolean"
},
"CodecovToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Configuration": {
"type": "string",
"enum": [
"Debug",
"Release"
]
},
"DiscordWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"FeedzNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"GitHubReleaseGitHubToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"IgnoreFailedSources": {
"type": "boolean",
"description": "Ignore unreachable sources during Restore"
},
"Major": {
"type": "boolean"
},
"MastodonAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"PublicNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathApiToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathSettings": {
"$ref": "#/definitions/SignPathSettings"
},
"SlackWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"TestDegreeOfParallelism": {
"type": "integer",
"format": "int32"
},
"TwitterAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterAccessTokenSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"UseHttps": {
"type": "boolean"
}
},
"definitions": {
"Host": {
"type": "string",
Expand Down Expand Up @@ -231,5 +150,92 @@
}
}
},
"$ref": "#/definitions/NukeBuild"
"allOf": [
{
"properties": {
"AutoStash": {
"type": "boolean"
},
"CodecovToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Configuration": {
"type": "string",
"enum": [
"Debug",
"Release"
]
},
"DiscordWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"FeedzNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"GitHubReleaseGitHubToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"IgnoreFailedSources": {
"type": "boolean",
"description": "Ignore unreachable sources during Restore"
},
"Major": {
"type": "boolean"
},
"MastodonAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"PublicNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathApiToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathSettings": {
"$ref": "#/definitions/SignPathSettings"
},
"SlackWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"TestDegreeOfParallelism": {
"type": "integer",
"format": "int32"
},
"TwitterAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterAccessTokenSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"UseHttps": {
"type": "boolean"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [8.1.4] / 2024-11-06
- Fixed `build.schema.json` generation to use `allOf` for user and base type properties

## [8.1.3] / 2024-11-05
- Fixed naming from `NukeBuild.IsSucessful` to `IsSucceeding`
- Fixed `NukeBuild.IsSucceeding` to negate `IsFailing`
Expand Down Expand Up @@ -1171,7 +1174,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added CLT tasks for Git
- Fixed background color in console output

[vNext]: https://github.com/nuke-build/nuke/compare/8.1.3...HEAD
[vNext]: https://github.com/nuke-build/nuke/compare/8.1.4...HEAD
[8.1.4]: https://github.com/nuke-build/nuke/compare/8.1.3...8.1.4
[8.1.3]: https://github.com/nuke-build/nuke/compare/8.1.2...8.1.3
[8.1.2]: https://github.com/nuke-build/nuke/compare/8.1.1...8.1.2
[8.1.1]: https://github.com/nuke-build/nuke/compare/8.1.0...8.1.1
Expand Down
9 changes: 5 additions & 4 deletions source/Nuke.Build.Shared/CompletionUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(
Func<JsonProperty, bool> filter = null)
{
filter ??= _ => true;
var definitions = schema.RootElement.GetProperty("definitions").EnumerateObject().ToDictionary(x => x.Name, x => x);
var rootElement = schema.RootElement;
var definitions = rootElement.GetProperty("definitions").EnumerateObject().ToDictionary(x => x.Name, x => x);

var parameterProperties = schema.RootElement.GetProperty("definitions").TryGetProperty("NukeBuild", out var nukebuildProperty)
? nukebuildProperty.GetProperty("properties").EnumerateObject()
.Concat(schema.RootElement.TryGetProperty("properties", out var properties) ? properties.EnumerateObject() : [])
var parameterProperties = rootElement.GetProperty("definitions").TryGetProperty("NukeBuild", out var baseSchema)
? baseSchema.GetProperty("properties").EnumerateObject()
.Concat(rootElement.GetProperty("allOf")[0].TryGetProperty("properties", out var properties) ? properties.EnumerateObject() : [])
: definitions["build"].Value.GetProperty("properties").EnumerateObject();

return parameterProperties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"ComplexTypeParamWithAttribute": {
"type": "string"
}
},
"definitions": {
"Host": {
"type": "string",
Expand Down Expand Up @@ -86,5 +81,16 @@
}
}
},
"$ref": "#/definitions/NukeBuild"
}
"allOf": [
{
"properties": {
"ComplexTypeParamWithAttribute": {
"type": "string"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,10 @@
}
}
},
"$ref": "#/definitions/NukeBuild"
"allOf": [
{},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
Loading

0 comments on commit a36819c

Please sign in to comment.