Skip to content

Commit

Permalink
Merge branch 'hotfix/7.0.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Aug 31, 2023
2 parents a9c4818 + d7ccb87 commit 3e37e2b
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 23 deletions.
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [7.0.4] / 2023-08-31
- Fixed check on nullable parameter type
- Fixed telemetry check on home repository
- Fixed missing environment variables for AppVeyor
- Fixed `ICreateGitHubRelease` to work with existing releases
- Fixed `ICreateGitHubRelease` to set `GitHubToken` unconditionally
- Fixed `SetBuildTarget` and `SetTestPlatform` overloads in `UnityTasks`
- Fixed `UnityRunTestsSettings` base type

## [7.0.3] / 2023-08-21
- Fixed enumeration value sets to exclude non-public fields
- Fixed check for `NUKE_ENTERPRISE_TOKEN` in `build.sh` bootstrapping script
Expand Down Expand Up @@ -1474,3 +1483,103 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
[0.3.1]: https://github.com/nuke-build/nuke/compare/0.2.10...0.3.1
[0.2.10]: https://github.com/nuke-build/nuke/compare/0.2.0...0.2.10
[0.2.0]: https://github.com/nuke-build/nuke/tree/0.2.0

[vNext]: https://github.com/nuke-build/nuke/compare/7.0.4...HEAD
[7.0.4]: https://github.com/nuke-build/nuke/compare/7.0.3...7.0.4
[7.0.3]: https://github.com/nuke-build/nuke/compare/7.0.2...7.0.3
[7.0.2]: https://github.com/nuke-build/nuke/compare/7.0.1...7.0.2
[7.0.1]: https://github.com/nuke-build/nuke/compare/7.0.0...7.0.1
[7.0.0]: https://github.com/nuke-build/nuke/compare/6.3.0...7.0.0
[6.3.0]: https://github.com/nuke-build/nuke/compare/6.2.1...6.3.0
[6.2.1]: https://github.com/nuke-build/nuke/compare/6.2.0...6.2.1
[6.2.0]: https://github.com/nuke-build/nuke/compare/6.1.2...6.2.0
[6.1.2]: https://github.com/nuke-build/nuke/compare/6.1.1...6.1.2
[6.1.1]: https://github.com/nuke-build/nuke/compare/6.1.0...6.1.1
[6.1.0]: https://github.com/nuke-build/nuke/compare/6.0.3...6.1.0
[6.0.3]: https://github.com/nuke-build/nuke/compare/6.0.2...6.0.3
[6.0.2]: https://github.com/nuke-build/nuke/compare/6.0.1...6.0.2
[6.0.1]: https://github.com/nuke-build/nuke/compare/6.0.0...6.0.1
[6.0.0]: https://github.com/nuke-build/nuke/compare/5.3.0...6.0.0
[5.3.0]: https://github.com/nuke-build/nuke/compare/5.2.1...5.3.0
[5.2.1]: https://github.com/nuke-build/nuke/compare/5.2.0...5.2.1
[5.2.0]: https://github.com/nuke-build/nuke/compare/5.1.4...5.2.0
[5.1.4]: https://github.com/nuke-build/nuke/compare/5.1.3...5.1.4
[5.1.3]: https://github.com/nuke-build/nuke/compare/5.1.2...5.1.3
[5.1.2]: https://github.com/nuke-build/nuke/compare/5.1.1...5.1.2
[5.1.1]: https://github.com/nuke-build/nuke/compare/5.1.0...5.1.1
[5.1.0]: https://github.com/nuke-build/nuke/compare/5.0.2...5.1.0
[5.0.2]: https://github.com/nuke-build/nuke/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/nuke-build/nuke/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/nuke-build/nuke/compare/0.25.0...5.0.0
[0.25.0]: https://github.com/nuke-build/nuke/compare/0.24.11...0.25.0
[0.24.11]: https://github.com/nuke-build/nuke/compare/0.24.10...0.24.11
[0.24.10]: https://github.com/nuke-build/nuke/compare/0.24.9...0.24.10
[0.24.9]: https://github.com/nuke-build/nuke/compare/0.24.8...0.24.9
[0.24.8]: https://github.com/nuke-build/nuke/compare/0.24.7...0.24.8
[0.24.7]: https://github.com/nuke-build/nuke/compare/0.24.6...0.24.7
[0.24.6]: https://github.com/nuke-build/nuke/compare/0.24.5...0.24.6
[0.24.5]: https://github.com/nuke-build/nuke/compare/0.24.4...0.24.5
[0.24.4]: https://github.com/nuke-build/nuke/compare/0.24.2...0.24.4
[0.24.2]: https://github.com/nuke-build/nuke/compare/0.24.1...0.24.2
[0.24.1]: https://github.com/nuke-build/nuke/compare/0.24.0...0.24.1
[0.24.0]: https://github.com/nuke-build/nuke/compare/0.23.7...0.24.0
[0.23.7]: https://github.com/nuke-build/nuke/compare/0.23.6...0.23.7
[0.23.6]: https://github.com/nuke-build/nuke/compare/0.23.5...0.23.6
[0.23.5]: https://github.com/nuke-build/nuke/compare/0.23.4...0.23.5
[0.23.4]: https://github.com/nuke-build/nuke/compare/0.23.3...0.23.4
[0.23.3]: https://github.com/nuke-build/nuke/compare/0.23.2...0.23.3
[0.23.2]: https://github.com/nuke-build/nuke/compare/0.23.1...0.23.2
[0.23.1]: https://github.com/nuke-build/nuke/compare/0.23.0...0.23.1
[0.23.0]: https://github.com/nuke-build/nuke/compare/0.22.2...0.23.0
[0.22.2]: https://github.com/nuke-build/nuke/compare/0.22.1...0.22.2
[0.22.1]: https://github.com/nuke-build/nuke/compare/0.22.0...0.22.1
[0.22.0]: https://github.com/nuke-build/nuke/compare/0.21.2...0.22.0
[0.21.2]: https://github.com/nuke-build/nuke/compare/0.21.1...0.21.2
[0.21.1]: https://github.com/nuke-build/nuke/compare/0.21.0...0.21.1
[0.21.0]: https://github.com/nuke-build/nuke/compare/0.20.1...0.21.0
[0.20.1]: https://github.com/nuke-build/nuke/compare/0.20.0...0.20.1
[0.20.0]: https://github.com/nuke-build/nuke/compare/0.19.2...0.20.0
[0.19.2]: https://github.com/nuke-build/nuke/compare/0.19.1...0.19.2
[0.19.1]: https://github.com/nuke-build/nuke/compare/0.19.0...0.19.1
[0.19.0]: https://github.com/nuke-build/nuke/compare/0.18.0...0.19.0
[0.18.0]: https://github.com/nuke-build/nuke/compare/0.17.7...0.18.0
[0.17.7]: https://github.com/nuke-build/nuke/compare/0.17.6...0.17.7
[0.17.6]: https://github.com/nuke-build/nuke/compare/0.17.5...0.17.6
[0.17.5]: https://github.com/nuke-build/nuke/compare/0.17.4...0.17.5
[0.17.4]: https://github.com/nuke-build/nuke/compare/0.17.3...0.17.4
[0.17.3]: https://github.com/nuke-build/nuke/compare/0.17.2...0.17.3
[0.17.2]: https://github.com/nuke-build/nuke/compare/0.17.1...0.17.2
[0.17.1]: https://github.com/nuke-build/nuke/compare/0.17.0...0.17.1
[0.17.0]: https://github.com/nuke-build/nuke/compare/0.16.0...0.17.0
[0.16.0]: https://github.com/nuke-build/nuke/compare/0.15.0...0.16.0
[0.15.0]: https://github.com/nuke-build/nuke/compare/0.14.1...0.15.0
[0.14.1]: https://github.com/nuke-build/nuke/compare/0.14.0...0.14.1
[0.14.0]: https://github.com/nuke-build/nuke/compare/0.13.0...0.14.0
[0.13.0]: https://github.com/nuke-build/nuke/compare/0.12.4...0.13.0
[0.12.4]: https://github.com/nuke-build/nuke/compare/0.12.3...0.12.4
[0.12.3]: https://github.com/nuke-build/nuke/compare/0.12.2...0.12.3
[0.12.2]: https://github.com/nuke-build/nuke/compare/0.12.1...0.12.2
[0.12.1]: https://github.com/nuke-build/nuke/compare/0.12.0...0.12.1
[0.12.0]: https://github.com/nuke-build/nuke/compare/0.11.1...0.12.0
[0.11.1]: https://github.com/nuke-build/nuke/compare/0.11.0...0.11.1
[0.11.0]: https://github.com/nuke-build/nuke/compare/0.10.5...0.11.0
[0.10.5]: https://github.com/nuke-build/nuke/compare/0.10.4...0.10.5
[0.10.4]: https://github.com/nuke-build/nuke/compare/0.10.3...0.10.4
[0.10.3]: https://github.com/nuke-build/nuke/compare/0.10.2...0.10.3
[0.10.2]: https://github.com/nuke-build/nuke/compare/0.10.1...0.10.2
[0.10.1]: https://github.com/nuke-build/nuke/compare/0.10.0...0.10.1
[0.10.0]: https://github.com/nuke-build/nuke/compare/0.9.1...0.10.0
[0.9.1]: https://github.com/nuke-build/nuke/compare/0.9.0...0.9.1
[0.9.0]: https://github.com/nuke-build/nuke/compare/0.8.0...0.9.0
[0.8.0]: https://github.com/nuke-build/nuke/compare/0.7.0...0.8.0
[0.7.0]: https://github.com/nuke-build/nuke/compare/0.6.2...0.7.0
[0.6.2]: https://github.com/nuke-build/nuke/compare/0.6.1...0.6.2
[0.6.1]: https://github.com/nuke-build/nuke/compare/0.6.0...0.6.1
[0.6.0]: https://github.com/nuke-build/nuke/compare/0.5.3...0.6.0
[0.5.3]: https://github.com/nuke-build/nuke/compare/0.5.2...0.5.3
[0.5.2]: https://github.com/nuke-build/nuke/compare/0.5.0...0.5.2
[0.5.0]: https://github.com/nuke-build/nuke/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/nuke-build/nuke/compare/0.3.1...0.4.0
[0.3.1]: https://github.com/nuke-build/nuke/compare/0.2.10...0.3.1
[0.2.10]: https://github.com/nuke-build/nuke/compare/0.2.0...0.2.10
[0.2.0]: https://github.com/nuke-build/nuke/tree/0.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using JetBrains.Annotations;
using Newtonsoft.Json.Linq;
using Nuke.Common.CI;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Utilities;
using Nuke.Common.Utilities.Collections;
using Nuke.Common.ValueInjection;
Expand Down Expand Up @@ -48,11 +48,10 @@ string DecryptValue(string profile, string name, string value)
name);

// TODO: Abstract AbsolutePath/Solution/Project etc.
string ConvertValue(Type scalarType, string value)
=> scalarType.IsAssignableTo(typeof(IAbsolutePathHolder))
? PathConstruction.HasPathRoot(value)
? value
: EnvironmentInfo.WorkingDirectory.GetUnixRelativePathTo(Build.RootDirectory / value)
string ConvertValue([CanBeNull] Type scalarType, string value)

Check notice on line 51 in source/Nuke.Build/Execution/Extensions/ArgumentsFromParametersFileAttribute.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Put local function after 'return' or 'continue'

Put local function 'ConvertValue' after 'return'
=> typeof(IAbsolutePathHolder).IsAssignableFrom(scalarType) &&
!PathConstruction.HasPathRoot(value)
? EnvironmentInfo.WorkingDirectory.GetUnixRelativePathTo(Build.RootDirectory / value)
: value;

var arguments = GetParameters().SelectMany(x => ConvertToArguments(x.Profile, x.Name, x.Values)).ToArray();
Expand Down
2 changes: 1 addition & 1 deletion source/Nuke.Build/Telemetry/Telemetry.Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static bool IsCommonType(Type type)
{
return type.Assembly
.GetCustomAttributes<AssemblyMetadataAttribute>()
.Any(x => x is { Key: "RepositoryUrl", Value: "https://github.com/nuke-build/nuke" });
.Any(x => x is { Key: "RepositoryUrl", Value: "https://github.com/nuke-build/nuke.git" });
}

private static bool IsCustomType(Type type)
Expand Down
3 changes: 3 additions & 0 deletions source/Nuke.Common/CI/AppVeyor/AppVeyor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ internal AppVeyor()
public string BuildWorkerImage => EnvironmentInfo.GetVariable("APPVEYOR_BUILD_WORKER_IMAGE");
[CanBeNull] public int? PullRequestNumber => EnvironmentInfo.GetVariable<int?>("APPVEYOR_PULL_REQUEST_NUMBER");
[CanBeNull] public string PullRequestTitle => EnvironmentInfo.GetVariable("APPVEYOR_PULL_REQUEST_TITLE");
[CanBeNull] public string PullRequestHeadRepositoryName => EnvironmentInfo.GetVariable("APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME");
[CanBeNull] public string PullRequestHeadRepositoryBranch => EnvironmentInfo.GetVariable("APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH");
[CanBeNull] public string PullRequestHeadCommit => EnvironmentInfo.GetVariable("APPVEYOR_PULL_REQUEST_HEAD_COMMIT");
public string JobId => EnvironmentInfo.GetVariable("APPVEYOR_JOB_ID");
[CanBeNull] public string JobName => EnvironmentInfo.GetVariable("APPVEYOR_JOB_NAME");
public int JobNumber => EnvironmentInfo.GetVariable<int>("APPVEYOR_JOB_NUMBER");
Expand Down
2 changes: 1 addition & 1 deletion source/Nuke.Common/Tools/Unity/Unity.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ protected override Arguments ConfigureProcessArguments(Arguments arguments)
[PublicAPI]
[ExcludeFromCodeCoverage]
[Serializable]
public partial class UnityRunTestsSettings : UnityBaseSettings
public partial class UnityRunTestsSettings : UnityProjectSettings
{
/// <summary>
/// Path to the Unity executable.
Expand Down
2 changes: 1 addition & 1 deletion source/Nuke.Common/Tools/Unity/Unity.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"customAssertion": true,
"definiteArgument": "-runTests",
"settingsClass": {
"baseClass": "UnityBaseSettings",
"baseClass": "UnityProjectSettings",
"properties": [
{
"name": "TestCategories",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.Tooling;

namespace Nuke.Common.Tools.Unity;

Expand All @@ -15,11 +14,10 @@ public static partial class UnityProjectSettingsExtensions

/// <summary><p><em>Sets <see cref="UnityProjectSettings.BuildTarget"/>.</em></p><p>Allows the selection of an active build target before a project is loaded.</p></summary>
[Pure]
public static UnityProjectSettings SetBuildTarget(this UnityProjectSettings toolSettings, UnityBuildTarget buildTarget)
public static T SetBuildTarget<T>(this T toolSettings, UnityBuildTarget buildTarget)
where T : UnityProjectSettings
{
toolSettings = toolSettings.NewInstance();
toolSettings.BuildTarget = buildTarget.ToString();
return toolSettings;
return toolSettings.SetBuildTarget(buildTarget.ToString());
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.Tooling;

namespace Nuke.Common.Tools.Unity;

Expand All @@ -18,23 +17,21 @@ public static partial class UnityRunTestsSettingsExtensions
/// <p>The platform to run tests on.</p>
/// </summary>
[Pure]
public static UnityRunTestsSettings SetTestPlatform(this UnityRunTestsSettings toolSettings, UnityTestPlatform testPlatform)
public static T SetTestPlatform<T>(this T toolSettings, UnityTestPlatform testPlatform)
where T : UnityRunTestsSettings
{
toolSettings = toolSettings.NewInstance();
toolSettings.TestPlatform = testPlatform.ToString();
return toolSettings;
return toolSettings.SetTestPlatform(testPlatform.ToString());
}

/// <summary>
/// <p><em>Sets <see cref="UnityRunTestsSettings.TestPlatform"/></em></p>
/// <p>The platform to run tests on.</p>
/// </summary>
[Pure]
public static UnityRunTestsSettings SetTestPlatform(this UnityRunTestsSettings toolSettings, UnityBuildTarget buildTarget)
public static T SetTestPlatform<T>(this T toolSettings, UnityBuildTarget buildTarget)
where T : UnityRunTestsSettings
{
toolSettings = toolSettings.NewInstance();
toolSettings.TestPlatform = buildTarget.ToString();
return toolSettings;
return toolSettings.SetTestPlatform(buildTarget.ToString());
}

#endregion
Expand Down

0 comments on commit 3e37e2b

Please sign in to comment.