Skip to content

Commit 7e09c3c

Browse files
committed
Merge branch 'hotfix/9.0.2' into develop
2 parents 482f5ac + 8bb7b0e commit 7e09c3c

File tree

93 files changed

+202
-733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+202
-733
lines changed

.run/Generate-Tools.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
1313
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
1414
<option name="PROJECT_KIND" value="DotNetCore" />
15-
<option name="PROJECT_TFM" value="net7.0" />
15+
<option name="PROJECT_TFM" value="net8.0" />
1616
<method v="2">
1717
<option name="Build" />
1818
</method>

.run/Publish MSBuildTasks.run.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Publish MSBuildTasks" type="RunNativeExe" factoryName="Native Executable">
33
<option name="EXE_PATH" value="/usr/local/share/dotnet/dotnet" />
4-
<option name="PROGRAM_PARAMETERS" value="publish --framework net9.0" />
4+
<option name="PROGRAM_PARAMETERS" value="publish --framework net8.0" />
55
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/source/Nuke.MSBuildTasks" />
66
<option name="PASS_PARENT_ENVS" value="1" />
77
<option name="USE_EXTERNAL_CONSOLE" value="0" />
88
<method v="2" />
99
</configuration>
10-
</component>
10+
</component>

CHANGELOG.md

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

77
## [vNext]
88

9+
## [9.0.2] / 2024-12-03
10+
- Fixed MSBuild tasks to use `net8.0` target framework
11+
- Fixed error handling in `:update` command
12+
- Fixed resolving tool path from options
13+
- Fixed nullable options for `ToolTasks.Run`
14+
- Fixed nullable underlying dictionary for delegate properties
15+
- Fixed skipping null and whitespace arguments
16+
- Fixed tool requirements
17+
- Fixed NPM tool path resolution
18+
- Fixed logging errors as standard in `GitTasks` and `DockerTasks`
19+
- Fixed argument format in `DotNetTasks`
20+
- Fixed nullable `Plugins` dictionary in `ReSharperTasks`
21+
922
## [9.0.1] / 2024-11-21
1023
- Fixed `Options` serialization to JSON
1124
- Fixed `Options` for default members in interfaces
@@ -1183,7 +1196,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
11831196
- Added CLT tasks for Git
11841197
- Fixed background color in console output
11851198

1186-
[vNext]: https://github.com/nuke-build/nuke/compare/9.0.1...HEAD
1199+
[vNext]: https://github.com/nuke-build/nuke/compare/9.0.2...HEAD
1200+
[9.0.2]: https://github.com/nuke-build/nuke/compare/9.0.1...9.0.2
11871201
[9.0.1]: https://github.com/nuke-build/nuke/compare/9.0.0...9.0.1
11881202
[9.0.0]: https://github.com/nuke-build/nuke/compare/8.1.4...9.0.0
11891203
[8.1.4]: https://github.com/nuke-build/nuke/compare/8.1.3...8.1.4

build/_build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<!-- Test properties for MSBuild integration -->
1717
<PropertyGroup>
1818
<NukeTasksEnabled Condition="'$(NukeTasksEnabled)' == ''">False</NukeTasksEnabled>
19-
<NukeTasksDirectory>$(MSBuildThisFileDirectory)\..\source\Nuke.MSBuildTasks\bin\Debug\net9.0\publish</NukeTasksDirectory>
19+
<NukeTasksDirectory>$(MSBuildThisFileDirectory)\..\source\Nuke.MSBuildTasks\bin\Debug\net8.0\publish</NukeTasksDirectory>
2020

2121
<!-- <PackAsTool>True</PackAsTool>-->
2222
<!-- <ToolCommandName>build</ToolCommandName>-->

source/Nuke.Build/Execution/TargetDefinition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ public ITargetDefinition Requires(Expression<Func<bool>> requirement, params Exp
140140
public ITargetDefinition Requires<T>()
141141
where T : IRequireTool
142142
{
143-
ToolRequirements.Add(typeof(T).GetCustomAttribute<ToolRequirementAttributeBase>().NotNull().GetRequirement());
143+
ToolRequirements.Add(typeof(T).GetCustomAttribute<ToolAttribute>().NotNull().GetRequirement());
144144
return this;
145145
}
146146

147147
public ITargetDefinition Requires<T>(string version)
148148
where T : IRequireToolWithVersion
149149
{
150-
ToolRequirements.Add(typeof(T).GetCustomAttribute<ToolRequirementAttributeBase>().NotNull().GetRequirement(version));
150+
ToolRequirements.Add(typeof(T).GetCustomAttribute<ToolAttribute>().NotNull().GetRequirement(version));
151151
return this;
152152
}
153153

source/Nuke.Build/RequiresAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public class RequiresAttribute<T> : RequiresAttribute
2222

2323
public override ToolRequirement GetRequirement()
2424
{
25-
return typeof(T).GetCustomAttribute<ToolRequirementAttributeBase>().NotNull().GetRequirement(Version);
25+
return typeof(T).GetCustomAttribute<ToolAttribute>().NotNull().GetRequirement(Version);
2626
}
2727
}

source/Nuke.Common.Tests/SettingsTest.cs

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,24 @@ public void TestDotNet()
117117
Assert(new DotNetRunSettings()
118118
.AddApplicationArguments("arg1")
119119
.AddApplicationArguments("arg2")
120-
.SetProperty("foo", "bar"),
121-
"run --property:foo=bar -- arg1 arg2");
120+
.SetProperty("foo", "bar")
121+
.SetInformationalVersion("version"),
122+
"run --property:foo=bar --property:InformationalVersion=version -- arg1 arg2");
123+
124+
Assert(new DotNetPackSettings()
125+
.SetAuthors("a", "b"),
126+
"pack --property:Authors=a,b");
127+
}
128+
129+
[Fact]
130+
public void TestDotNet_Empty()
131+
{
132+
Assert(new DotNetBuildSettings()
133+
.SetFramework(null)
134+
.SetConfiguration("")
135+
.SetProperty("foo1", null)
136+
.SetProperty("foo2", ""),
137+
"build");
122138
}
123139

124140
[Fact]
@@ -157,9 +173,10 @@ public void TestKubernetes()
157173
"exec --container=container --cluster=cluster -- command arg1 arg2");
158174
}
159175

160-
private static void Assert<T>(T options, string arguments)
176+
private static void Assert<T>(T options, string expected)
161177
where T : ToolOptions, new()
162178
{
163-
options.GetArguments().JoinSpace().Should().Be(arguments);
179+
var arguments = options.GetArguments().JoinSpace();
180+
arguments.Should().Be(expected);
164181
}
165182
}

source/Nuke.Common/Attributes/NpmPackageAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public NpmPackageAttribute(string packageId, string packageExecutable = null)
2525

2626
public override ToolRequirement GetRequirement(MemberInfo member)
2727
{
28-
return NpmPackageRequirement.Create(_packageId, Version);
28+
return new NpmPackageRequirement(_packageId, Version);
2929
}
3030

3131
public override object GetValue(MemberInfo member, object instance)

source/Nuke.Common/Attributes/NuGetPackageAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public NuGetPackageAttribute(string packageId, string packageExecutable32, strin
5555

5656
public override ToolRequirement GetRequirement(MemberInfo member)
5757
{
58-
return NuGetPackageRequirement.Create(_packageId, Version);
58+
return new NuGetPackageRequirement(_packageId, Version);
5959
}
6060

6161
public override object GetValue(MemberInfo member, object instance)

source/Nuke.Common/Attributes/PathVariableAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public PathVariableAttribute(string pathExecutable = null)
4141
public override ToolRequirement GetRequirement(MemberInfo member)
4242
{
4343
var name = _pathExecutable ?? member.Name.ToLowerInvariant();
44-
return PathToolRequirement.Create(name);
44+
return new PathToolRequirement(name);
4545
}
4646

4747
public override object GetValue(MemberInfo member, object instance)

0 commit comments

Comments
 (0)