Skip to content

Commit cada49c

Browse files
committed
Merge branch 'hotfix/8.1.3' into develop
2 parents 9f71613 + 79269f4 commit cada49c

17 files changed

+1457
-896
lines changed

CHANGELOG.md

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

77
## [vNext]
88

9+
## [8.1.3] / 2024-11-05
10+
- Fixed naming from `NukeBuild.IsSucessful` to `IsSucceeding`
11+
- Fixed `NukeBuild.IsSucceeding` to negate `IsFailing`
12+
- Fixed NJsonSchema reference version
13+
- Fixed `:secrets` command to find secret parameters
14+
- Fixed argument format in `DotNetTasks`
15+
- Fixed definite argument in `EntityFrameworkTasks`
16+
- Fixed deprecated argument in `MinVerTasks`
17+
918
## [8.1.2] / 2024-10-13
1019
- Fixed exclusion of skipped target from lookup for skippable dependencies
1120
- Fixed resolution of empty environment variables to false
@@ -1162,7 +1171,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
11621171
- Added CLT tasks for Git
11631172
- Fixed background color in console output
11641173

1165-
[vNext]: https://github.com/nuke-build/nuke/compare/8.1.2...HEAD
1174+
[vNext]: https://github.com/nuke-build/nuke/compare/8.1.3...HEAD
1175+
[8.1.3]: https://github.com/nuke-build/nuke/compare/8.1.2...8.1.3
11661176
[8.1.2]: https://github.com/nuke-build/nuke/compare/8.1.1...8.1.2
11671177
[8.1.1]: https://github.com/nuke-build/nuke/compare/8.1.0...8.1.1
11681178
[8.1.0]: https://github.com/nuke-build/nuke/compare/8.0.0...8.1.0

Directory.Packages.props

+19-18
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageVersion Include="Azure.Identity" Version="1.12.1" />
9-
<PackageVersion Include="Azure.Security.KeyVault.Certificates" Version="4.6.0" />
10-
<PackageVersion Include="Azure.Security.KeyVault.Keys" Version="4.6.0" />
11-
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
12-
<PackageVersion Include="Basic.Reference.Assemblies.NetStandard20" Version="1.7.2" />
8+
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
9+
<PackageVersion Include="Azure.Security.KeyVault.Certificates" Version="4.7.0" />
10+
<PackageVersion Include="Azure.Security.KeyVault.Keys" Version="4.7.0" />
11+
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
12+
<PackageVersion Include="Basic.Reference.Assemblies.NetStandard20" Version="1.7.9" />
1313
<PackageVersion Include="Glob" Version="1.1.9" />
14-
<PackageVersion Include="HtmlAgilityPack" Version="1.11.67" />
14+
<PackageVersion Include="HtmlAgilityPack" Version="1.11.70" />
1515
<PackageVersion Include="Humanizer" Version="2.14.1" />
16-
<PackageVersion Include="JetBrains.Annotations" Version="2024.2.0" />
16+
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" />
1717
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
1818
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
1919
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
20-
<PackageVersion Include="NJsonSchema" Version="10.9.0" />
20+
<PackageVersion Include="NJsonSchema" Version="11.0.2" />
21+
<PackageVersion Include="NJsonSchema.NewtonsoftJson" Version="11.0.2" />
2122
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
2223
<PackageVersion Include="NuGet.Packaging" Version="6.11.1" />
2324
<PackageVersion Include="Octokit" Version="13.0.1" />
24-
<PackageVersion Include="Serilog" Version="4.0.2" />
25+
<PackageVersion Include="Serilog" Version="4.1.0" />
2526
<PackageVersion Include="Serilog.Formatting.Compact" Version="3.0.0" />
2627
<PackageVersion Include="Serilog.Formatting.Compact.Reader" Version="4.0.0" />
2728
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
@@ -37,24 +38,24 @@
3738
<!-- Testing -->
3839
<ItemGroup>
3940
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
40-
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
41+
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
4142
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
4243
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
43-
<PackageVersion Include="TeamCity.VSTest.TestAdapter" Version="1.0.40" />
44+
<PackageVersion Include="TeamCity.VSTest.TestAdapter" Version="1.0.41" />
4445
<PackageVersion Include="Verify.Xunit" Version="25.0.2" />
4546
<PackageVersion Include="Verify.DiffPlex" Version="2.3.0" />
4647
<PackageVersion Include="Verify.SourceGenerators" Version="2.2.0" />
47-
<PackageVersion Include="xunit" Version="2.8.1" />
48-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.1" />
48+
<PackageVersion Include="xunit" Version="2.9.2" />
49+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
4950
</ItemGroup>
5051

5152
<!-- Roslyn (Nuke.SourceGenerator + Nuke.GlobalTool) -->
5253
<ItemGroup>
53-
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
54-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
55-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" />
56-
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.10.0" />
57-
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.10.0" />
54+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
55+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
56+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
57+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.11.0" />
58+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.11.0" />
5859
</ItemGroup>
5960

6061
<!-- MSBuild (Nuke.ProjectModel + Nuke.MSBuildTasks) -->

source/Nuke.Build.Shared/CompletionUtility.cs

+16-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,21 @@ namespace Nuke.Common.Utilities;
1414

1515
public static class CompletionUtility
1616
{
17-
public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(AbsolutePath schemaFile, IEnumerable<string> profileNames)
17+
public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(
18+
AbsolutePath schemaFile,
19+
IEnumerable<string> profileNames = null,
20+
Func<JsonProperty, bool> filter = null)
1821
{
1922
var schema = JsonDocument.Parse(schemaFile.ReadAllText());
20-
return GetItemsFromSchema(schema, profileNames);
23+
return GetItemsFromSchema(schema, profileNames, filter);
2124
}
2225

23-
public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(JsonDocument schema, IEnumerable<string> profileNames)
26+
public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(
27+
JsonDocument schema,
28+
IEnumerable<string> profileNames = null,
29+
Func<JsonProperty, bool> filter = null)
2430
{
31+
filter ??= _ => true;
2532
var definitions = schema.RootElement.GetProperty("definitions").EnumerateObject().ToDictionary(x => x.Name, x => x);
2633

2734
var parameterProperties = schema.RootElement.GetProperty("definitions").TryGetProperty("NukeBuild", out var nukebuildProperty)
@@ -30,19 +37,22 @@ public static IReadOnlyDictionary<string, string[]> GetItemsFromSchema(JsonDocum
3037
: definitions["build"].Value.GetProperty("properties").EnumerateObject();
3138

3239
return parameterProperties
40+
.Where(filter)
3341
.Select(x => (x.Name, Values: GetValues(x)))
3442
.Where(x => x.Values != null)
35-
.ToDictionary(x => x.Name, x => x.Values)
36-
.SetKeyValue(Constants.LoadedLocalProfilesParameterName, profileNames.ToArray()).AsReadOnly();
43+
.ToDictionary(x => x.Name, x => x.Values).AsReadOnly();
3744

3845
string[] GetValues(JsonProperty property)
3946
{
47+
if (property.Name == Constants.LoadedLocalProfilesParameterName)
48+
return profileNames.ToArray();
49+
4050
if (property.Value.TryGetProperty("type", out var typeProperty))
4151
{
4252
var types = typeProperty.ValueKind != JsonValueKind.Array
4353
? [typeProperty.GetString()]
4454
: typeProperty.EnumerateArray().Select(x => x.GetString()).ToArray();
45-
if (types.ContainsAnyOrdinalIgnoreCase(["string", "boolean", "integer"]))
55+
if (types.ContainsAnyOrdinalIgnoreCase("string", "boolean", "integer"))
4656
{
4757
return property.Value.TryGetProperty("enum", out var enumProperty)
4858
? enumProperty.EnumerateArray().Select(x => x.GetString()).ToArray()

source/Nuke.Build/Execution/BuildManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static int Execute<T>(Expression<Func<T, Target>>[] defaultTargetExpressi
7575
build,
7676
ParameterService.GetParameter<string[]>(() => build.SkippedTargets));
7777

78-
return build.ExitCode ??= build.IsSuccessful ? 0 : ErrorExitCode;
78+
return build.ExitCode ??= build.IsSucceeding ? 0 : ErrorExitCode;
7979
}
8080
catch (Exception exception)
8181
{

source/Nuke.Build/Host.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static string GetInformation(ExecutableTarget target)
163163
protected internal virtual void WriteBuildOutcome(INukeBuild build)
164164
{
165165
Debug();
166-
if (build.IsSuccessful)
166+
if (build.IsSucceeding)
167167
Success($"Build succeeded on {DateTime.Now.ToString(CultureInfo.CurrentCulture)}. \(^ᴗ^)/");
168168
else
169169
Error($"Build failed on {DateTime.Now.ToString(CultureInfo.CurrentCulture)}. (╯°□°)╯︵ ┻━┻");

source/Nuke.Build/INukeBuild.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface INukeBuild
3535
IReadOnlyCollection<ExecutableTarget> SucceededTargets { get; }
3636
IReadOnlyCollection<ExecutableTarget> FinishedTargets { get; }
3737

38-
bool IsSuccessful { get; }
38+
bool IsSucceeding { get; }
3939
bool IsFailing { get; }
4040
bool IsFinished { get; }
4141
int? ExitCode { get; set; }

source/Nuke.Build/Nuke.Build.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<PackageReference Include="Microsoft.ApplicationInsights" />
2121
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
2222
<PackageReference Include="NJsonSchema" />
23+
<PackageReference Include="NJsonSchema.NewtonsoftJson" />
2324
<PackageReference Include="Serilog.Formatting.Compact" />
2425
<PackageReference Include="Serilog.Formatting.Compact.Reader" />
2526
<PackageReference Include="Serilog.Sinks.Console" />

source/Nuke.Build/NukeBuild.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ protected static int Execute<T>(params Expression<Func<T, Target>>[] defaultTarg
184184
internal IEnumerable<string> TargetNames => ExecutableTargetFactory.GetTargetProperties(GetType()).Select(x => x.GetDisplayShortName());
185185
internal IEnumerable<string> HostNames => Host.AvailableTypes.Select(x => x.Name);
186186

187-
public bool IsSuccessful => ExecutionPlan.All(x => x.Status is
188-
ExecutionStatus.Succeeded or
189-
ExecutionStatus.Skipped or
190-
ExecutionStatus.Collective);
187+
public bool IsSucceeding => !IsFailing;
191188

192189
public bool IsFailing => ExecutionPlan.Any(x => x.Status is
193190
ExecutionStatus.Failed or

source/Nuke.Build/Utilities/SchemaUtility.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Newtonsoft.Json.Serialization;
1414
using NJsonSchema;
1515
using NJsonSchema.Generation;
16+
using NJsonSchema.NewtonsoftJson.Generation;
1617
using NuGet.Packaging;
1718
using Nuke.Common.Utilities;
1819
using Nuke.Common.ValueInjection;
@@ -38,7 +39,7 @@ public static JsonSchema Generate<T>(T build) where T : INukeBuild
3839
{
3940
return new SchemaGenerator(
4041
build,
41-
new JsonSchemaGeneratorSettings
42+
new NewtonsoftJsonSchemaGeneratorSettings
4243
{
4344
FlattenInheritanceHierarchy = true,
4445
SerializerSettings =

0 commit comments

Comments
 (0)