Skip to content

Commit

Permalink
Merge branch 'hotfix/5.0.2' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Dec 7, 2020
2 parents ed5be8e + 3143ea0 commit ea81e19
Show file tree
Hide file tree
Showing 9 changed files with 231 additions and 124 deletions.
156 changes: 81 additions & 75 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [5.0.2] / 2020-12-07
- Fixed `ChangelogTasks` to use HTTPS links in history
- Fixed `DotNetRun` and `DotNetTest` run settings
- Fixed conditions for informational text

## [5.0.1] / 2020-12-06
- Fixed configuration generation to wait for user input after file changes
- Fixed build summary for durations smaller than 1 second
Expand Down Expand Up @@ -660,79 +665,80 @@ 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]: git@github.com:nuke-build/nuke/compare/5.0.1...HEAD
[5.0.1]: git@github.com:nuke-build/nuke/compare/5.0.0...5.0.1
[5.0.0]: git@github.com:nuke-build/nuke/compare/0.25.0...5.0.0
[0.25.0]: git@github.com:nuke-build/nuke/compare/0.24.11...0.25.0
[0.24.11]: git@github.com:nuke-build/nuke/compare/0.24.10...0.24.11
[0.24.10]: git@github.com:nuke-build/nuke/compare/0.24.9...0.24.10
[0.24.9]: git@github.com:nuke-build/nuke/compare/0.24.8...0.24.9
[0.24.8]: git@github.com:nuke-build/nuke/compare/0.24.7...0.24.8
[0.24.7]: git@github.com:nuke-build/nuke/compare/0.24.6...0.24.7
[0.24.6]: git@github.com:nuke-build/nuke/compare/0.24.5...0.24.6
[0.24.5]: git@github.com:nuke-build/nuke/compare/0.24.4...0.24.5
[0.24.4]: git@github.com:nuke-build/nuke/compare/0.24.2...0.24.4
[0.24.2]: git@github.com:nuke-build/nuke/compare/0.24.1...0.24.2
[0.24.1]: git@github.com:nuke-build/nuke/compare/0.24.0...0.24.1
[0.24.0]: git@github.com:nuke-build/nuke/compare/0.23.7...0.24.0
[0.23.7]: git@github.com:nuke-build/nuke/compare/0.23.6...0.23.7
[0.23.6]: git@github.com:nuke-build/nuke/compare/0.23.5...0.23.6
[0.23.5]: git@github.com:nuke-build/nuke/compare/0.23.4...0.23.5
[0.23.4]: git@github.com:nuke-build/nuke/compare/0.23.3...0.23.4
[0.23.3]: git@github.com:nuke-build/nuke/compare/0.23.2...0.23.3
[0.23.2]: git@github.com:nuke-build/nuke/compare/0.23.1...0.23.2
[0.23.1]: git@github.com:nuke-build/nuke/compare/0.23.0...0.23.1
[0.23.0]: git@github.com:nuke-build/nuke/compare/0.22.2...0.23.0
[0.22.2]: git@github.com:nuke-build/nuke/compare/0.22.1...0.22.2
[0.22.1]: git@github.com:nuke-build/nuke/compare/0.22.0...0.22.1
[0.22.0]: git@github.com:nuke-build/nuke/compare/0.21.2...0.22.0
[0.21.2]: git@github.com:nuke-build/nuke/compare/0.21.1...0.21.2
[0.21.1]: git@github.com:nuke-build/nuke/compare/0.21.0...0.21.1
[0.21.0]: git@github.com:nuke-build/nuke/compare/0.20.1...0.21.0
[0.20.1]: git@github.com:nuke-build/nuke/compare/0.20.0...0.20.1
[0.20.0]: git@github.com:nuke-build/nuke/compare/0.19.2...0.20.0
[0.19.2]: git@github.com:nuke-build/nuke/compare/0.19.1...0.19.2
[0.19.1]: git@github.com:nuke-build/nuke/compare/0.19.0...0.19.1
[0.19.0]: git@github.com:nuke-build/nuke/compare/0.18.0...0.19.0
[0.18.0]: git@github.com:nuke-build/nuke/compare/0.17.7...0.18.0
[0.17.7]: git@github.com:nuke-build/nuke/compare/0.17.6...0.17.7
[0.17.6]: git@github.com:nuke-build/nuke/compare/0.17.5...0.17.6
[0.17.5]: git@github.com:nuke-build/nuke/compare/0.17.4...0.17.5
[0.17.4]: git@github.com:nuke-build/nuke/compare/0.17.3...0.17.4
[0.17.3]: git@github.com:nuke-build/nuke/compare/0.17.2...0.17.3
[0.17.2]: git@github.com:nuke-build/nuke/compare/0.17.1...0.17.2
[0.17.1]: git@github.com:nuke-build/nuke/compare/0.17.0...0.17.1
[0.17.0]: git@github.com:nuke-build/nuke/compare/0.16.0...0.17.0
[0.16.0]: git@github.com:nuke-build/nuke/compare/0.15.0...0.16.0
[0.15.0]: git@github.com:nuke-build/nuke/compare/0.14.1...0.15.0
[0.14.1]: git@github.com:nuke-build/nuke/compare/0.14.0...0.14.1
[0.14.0]: git@github.com:nuke-build/nuke/compare/0.13.0...0.14.0
[0.13.0]: git@github.com:nuke-build/nuke/compare/0.12.4...0.13.0
[0.12.4]: git@github.com:nuke-build/nuke/compare/0.12.3...0.12.4
[0.12.3]: git@github.com:nuke-build/nuke/compare/0.12.2...0.12.3
[0.12.2]: git@github.com:nuke-build/nuke/compare/0.12.1...0.12.2
[0.12.1]: git@github.com:nuke-build/nuke/compare/0.12.0...0.12.1
[0.12.0]: git@github.com:nuke-build/nuke/compare/0.11.1...0.12.0
[0.11.1]: git@github.com:nuke-build/nuke/compare/0.11.0...0.11.1
[0.11.0]: git@github.com:nuke-build/nuke/compare/0.10.5...0.11.0
[0.10.5]: git@github.com:nuke-build/nuke/compare/0.10.4...0.10.5
[0.10.4]: git@github.com:nuke-build/nuke/compare/0.10.3...0.10.4
[0.10.3]: git@github.com:nuke-build/nuke/compare/0.10.2...0.10.3
[0.10.2]: git@github.com:nuke-build/nuke/compare/0.10.1...0.10.2
[0.10.1]: git@github.com:nuke-build/nuke/compare/0.10.0...0.10.1
[0.10.0]: git@github.com:nuke-build/nuke/compare/0.9.1...0.10.0
[0.9.1]: git@github.com:nuke-build/nuke/compare/0.9.0...0.9.1
[0.9.0]: git@github.com:nuke-build/nuke/compare/0.8.0...0.9.0
[0.8.0]: git@github.com:nuke-build/nuke/compare/0.7.0...0.8.0
[0.7.0]: git@github.com:nuke-build/nuke/compare/0.6.2...0.7.0
[0.6.2]: git@github.com:nuke-build/nuke/compare/0.6.1...0.6.2
[0.6.1]: git@github.com:nuke-build/nuke/compare/0.6.0...0.6.1
[0.6.0]: git@github.com:nuke-build/nuke/compare/0.5.3...0.6.0
[0.5.3]: git@github.com:nuke-build/nuke/compare/0.5.2...0.5.3
[0.5.2]: git@github.com:nuke-build/nuke/compare/0.5.0...0.5.2
[0.5.0]: git@github.com:nuke-build/nuke/compare/0.4.0...0.5.0
[0.4.0]: git@github.com:nuke-build/nuke/compare/0.3.1...0.4.0
[0.3.1]: git@github.com:nuke-build/nuke/compare/0.2.10...0.3.1
[0.2.10]: git@github.com:nuke-build/nuke/compare/0.2.0...0.2.10
[0.2.0]: git@github.com:nuke-build/nuke/tree/0.2.0
[vNext]: https://github.com/nuke-build/nuke.git/compare/5.0.2...HEAD
[5.0.2]: https://github.com/nuke-build/nuke.git/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/nuke-build/nuke.git/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/nuke-build/nuke.git/compare/0.25.0...5.0.0
[0.25.0]: https://github.com/nuke-build/nuke.git/compare/0.24.11...0.25.0
[0.24.11]: https://github.com/nuke-build/nuke.git/compare/0.24.10...0.24.11
[0.24.10]: https://github.com/nuke-build/nuke.git/compare/0.24.9...0.24.10
[0.24.9]: https://github.com/nuke-build/nuke.git/compare/0.24.8...0.24.9
[0.24.8]: https://github.com/nuke-build/nuke.git/compare/0.24.7...0.24.8
[0.24.7]: https://github.com/nuke-build/nuke.git/compare/0.24.6...0.24.7
[0.24.6]: https://github.com/nuke-build/nuke.git/compare/0.24.5...0.24.6
[0.24.5]: https://github.com/nuke-build/nuke.git/compare/0.24.4...0.24.5
[0.24.4]: https://github.com/nuke-build/nuke.git/compare/0.24.2...0.24.4
[0.24.2]: https://github.com/nuke-build/nuke.git/compare/0.24.1...0.24.2
[0.24.1]: https://github.com/nuke-build/nuke.git/compare/0.24.0...0.24.1
[0.24.0]: https://github.com/nuke-build/nuke.git/compare/0.23.7...0.24.0
[0.23.7]: https://github.com/nuke-build/nuke.git/compare/0.23.6...0.23.7
[0.23.6]: https://github.com/nuke-build/nuke.git/compare/0.23.5...0.23.6
[0.23.5]: https://github.com/nuke-build/nuke.git/compare/0.23.4...0.23.5
[0.23.4]: https://github.com/nuke-build/nuke.git/compare/0.23.3...0.23.4
[0.23.3]: https://github.com/nuke-build/nuke.git/compare/0.23.2...0.23.3
[0.23.2]: https://github.com/nuke-build/nuke.git/compare/0.23.1...0.23.2
[0.23.1]: https://github.com/nuke-build/nuke.git/compare/0.23.0...0.23.1
[0.23.0]: https://github.com/nuke-build/nuke.git/compare/0.22.2...0.23.0
[0.22.2]: https://github.com/nuke-build/nuke.git/compare/0.22.1...0.22.2
[0.22.1]: https://github.com/nuke-build/nuke.git/compare/0.22.0...0.22.1
[0.22.0]: https://github.com/nuke-build/nuke.git/compare/0.21.2...0.22.0
[0.21.2]: https://github.com/nuke-build/nuke.git/compare/0.21.1...0.21.2
[0.21.1]: https://github.com/nuke-build/nuke.git/compare/0.21.0...0.21.1
[0.21.0]: https://github.com/nuke-build/nuke.git/compare/0.20.1...0.21.0
[0.20.1]: https://github.com/nuke-build/nuke.git/compare/0.20.0...0.20.1
[0.20.0]: https://github.com/nuke-build/nuke.git/compare/0.19.2...0.20.0
[0.19.2]: https://github.com/nuke-build/nuke.git/compare/0.19.1...0.19.2
[0.19.1]: https://github.com/nuke-build/nuke.git/compare/0.19.0...0.19.1
[0.19.0]: https://github.com/nuke-build/nuke.git/compare/0.18.0...0.19.0
[0.18.0]: https://github.com/nuke-build/nuke.git/compare/0.17.7...0.18.0
[0.17.7]: https://github.com/nuke-build/nuke.git/compare/0.17.6...0.17.7
[0.17.6]: https://github.com/nuke-build/nuke.git/compare/0.17.5...0.17.6
[0.17.5]: https://github.com/nuke-build/nuke.git/compare/0.17.4...0.17.5
[0.17.4]: https://github.com/nuke-build/nuke.git/compare/0.17.3...0.17.4
[0.17.3]: https://github.com/nuke-build/nuke.git/compare/0.17.2...0.17.3
[0.17.2]: https://github.com/nuke-build/nuke.git/compare/0.17.1...0.17.2
[0.17.1]: https://github.com/nuke-build/nuke.git/compare/0.17.0...0.17.1
[0.17.0]: https://github.com/nuke-build/nuke.git/compare/0.16.0...0.17.0
[0.16.0]: https://github.com/nuke-build/nuke.git/compare/0.15.0...0.16.0
[0.15.0]: https://github.com/nuke-build/nuke.git/compare/0.14.1...0.15.0
[0.14.1]: https://github.com/nuke-build/nuke.git/compare/0.14.0...0.14.1
[0.14.0]: https://github.com/nuke-build/nuke.git/compare/0.13.0...0.14.0
[0.13.0]: https://github.com/nuke-build/nuke.git/compare/0.12.4...0.13.0
[0.12.4]: https://github.com/nuke-build/nuke.git/compare/0.12.3...0.12.4
[0.12.3]: https://github.com/nuke-build/nuke.git/compare/0.12.2...0.12.3
[0.12.2]: https://github.com/nuke-build/nuke.git/compare/0.12.1...0.12.2
[0.12.1]: https://github.com/nuke-build/nuke.git/compare/0.12.0...0.12.1
[0.12.0]: https://github.com/nuke-build/nuke.git/compare/0.11.1...0.12.0
[0.11.1]: https://github.com/nuke-build/nuke.git/compare/0.11.0...0.11.1
[0.11.0]: https://github.com/nuke-build/nuke.git/compare/0.10.5...0.11.0
[0.10.5]: https://github.com/nuke-build/nuke.git/compare/0.10.4...0.10.5
[0.10.4]: https://github.com/nuke-build/nuke.git/compare/0.10.3...0.10.4
[0.10.3]: https://github.com/nuke-build/nuke.git/compare/0.10.2...0.10.3
[0.10.2]: https://github.com/nuke-build/nuke.git/compare/0.10.1...0.10.2
[0.10.1]: https://github.com/nuke-build/nuke.git/compare/0.10.0...0.10.1
[0.10.0]: https://github.com/nuke-build/nuke.git/compare/0.9.1...0.10.0
[0.9.1]: https://github.com/nuke-build/nuke.git/compare/0.9.0...0.9.1
[0.9.0]: https://github.com/nuke-build/nuke.git/compare/0.8.0...0.9.0
[0.8.0]: https://github.com/nuke-build/nuke.git/compare/0.7.0...0.8.0
[0.7.0]: https://github.com/nuke-build/nuke.git/compare/0.6.2...0.7.0
[0.6.2]: https://github.com/nuke-build/nuke.git/compare/0.6.1...0.6.2
[0.6.1]: https://github.com/nuke-build/nuke.git/compare/0.6.0...0.6.1
[0.6.0]: https://github.com/nuke-build/nuke.git/compare/0.5.3...0.6.0
[0.5.3]: https://github.com/nuke-build/nuke.git/compare/0.5.2...0.5.3
[0.5.2]: https://github.com/nuke-build/nuke.git/compare/0.5.0...0.5.2
[0.5.0]: https://github.com/nuke-build/nuke.git/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/nuke-build/nuke.git/compare/0.3.1...0.4.0
[0.3.1]: https://github.com/nuke-build/nuke.git/compare/0.2.10...0.3.1
[0.2.10]: https://github.com/nuke-build/nuke.git/compare/0.2.0...0.2.10
[0.2.0]: https://github.com/nuke-build/nuke.git/tree/0.2.0

5 changes: 4 additions & 1 deletion build/Build.GitFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ partial class Build
.Executes(async () =>
{
var milestoneTitle = $"v{MajorMinorPatchVersion}";
var milestone = (await GitRepository.GetGitHubMilestone(milestoneTitle)).NotNull("milestone != null");
var milestone = await GitRepository.GetGitHubMilestone(milestoneTitle);
if (milestone == null)
return;

Assert(milestone.OpenIssues == 0, "milestone.OpenIssues == 0");
Assert(milestone.ClosedIssues != 0, "milestone.ClosedIssues != 0");
Assert(milestone.State == ItemState.Closed, "milestone.State == ItemState.Closed");
Expand Down
13 changes: 11 additions & 2 deletions build/specifications/DotNet.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@
"type": "bool",
"format": "--blame",
"help": "Runs the tests in blame mode. This option is helpful in isolating the problematic tests causing test host to crash. It creates an output file in the current directory as <em>Sequence.xml</em> that captures the order of tests execution before the crash."
},
{
"name": "RunSettings",
"type": "Dictionary<string, object>",
"format": "-- {value}",
"itemFormat": "{key}={value}",
"separator": " ",
"isTailArgument": true
}
]
}
Expand Down Expand Up @@ -192,7 +200,8 @@
"type": "string",
"format": "-- {value}",
"customValue": true,
"help": "Arguments passed to the application being run."
"help": "Arguments passed to the application being run.",
"isTailArgument": true
}
]
}
Expand Down Expand Up @@ -1046,4 +1055,4 @@
]
}
]
}
}
2 changes: 2 additions & 0 deletions source/Nuke.CodeGeneration/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ bool NotExistent(Property property)
foreach (var delegateProperty in property.Delegates)
delegateProperty.DataClass = task.SettingsClass;
}

task.SettingsClass.Properties = task.SettingsClass.Properties.OrderBy(x => x.IsTailArgument).ToList();
}

foreach (var dataClass in tool.DataClasses)
Expand Down
2 changes: 2 additions & 0 deletions source/Nuke.CodeGeneration/Model/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@ public DataClass DataClass
public string DeprecationMessage { get; set; }

public bool OnlyDelegates { get; set; }

public bool IsTailArgument { get; set; }
}
}
5 changes: 4 additions & 1 deletion source/Nuke.CodeGeneration/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
},
"onlyDelegates": {
"type": "boolean"
},
"isTailArgument": {
"type": "boolean"
}
},
"required": [
Expand Down Expand Up @@ -363,4 +366,4 @@
"name",
"officialUrl"
]
}
}
6 changes: 3 additions & 3 deletions source/Nuke.Common/ChangeLog/ChangeLogTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ private static void UpdateVersionSummary(string tag, List<string> content, [CanB
content.RemoveRange(lastSection.EndIndex + 1, content.Count - lastSection.EndIndex - 1);

content.Add(string.Empty);
content.Add($"[{firstSection.Caption}]: {repository}/compare/{tag}...HEAD");
content.Add($"[{firstSection.Caption}]: {repository.HttpsUrl}/compare/{tag}...HEAD");
for (var i = 1; i + 1 < sections.Count; i++)
content.Add($"[{sections[i].Caption}]: {repository}/compare/{sections[i + 1].Caption}...{sections[i].Caption}");
content.Add($"[{lastSection.Caption}]: {repository}/tree/{lastSection.Caption}");
content.Add($"[{sections[i].Caption}]: {repository.HttpsUrl}/compare/{sections[i + 1].Caption}...{sections[i].Caption}");
content.Add($"[{lastSection.Caption}]: {repository.HttpsUrl}/tree/{lastSection.Caption}");
}
}

Expand Down
46 changes: 35 additions & 11 deletions source/Nuke.Common/OutputSinks/OutputSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using Nuke.Common.CI;
using Nuke.Common.Execution;
using Nuke.Common.Git;
using Nuke.Common.Tools.GitHub;
Expand Down Expand Up @@ -70,26 +72,48 @@ internal virtual void WriteSummary(NukeBuild build)
WriteNormal();

if (build.IsSuccessful)
{
WriteSuccessfulBuild();
else
WriteFailedBuild();

bool HasHighUsage()
=> // global tool
build.GetType().GetInterfaces().Length > 1 ||
// configuration generation
build.GetType().GetCustomAttributes<ConfigurationAttributeBase>().Any() ||
// interface implementations
NukeBuild.BuildProjectFile == null;

if (!GitRepository.FromLocalDirectory(NukeBuild.RootDirectory)?.IsGitHubRepository() ?? false)
T TryGetValue<T>(Func<T> func)
{
try
{
return func.Invoke();
}
catch
{
WriteNormal();
WriteInformation("If you like NUKE, you'll love what is coming! πŸ€“");
WriteInformation("We're currently waiting for more sponsors to release a new version.");
WriteInformation("Please check out our tiers: https://github.com/sponsors/matkoch");
WriteInformation("As a sponsor you'll also gain access to numerous perks. πŸš€");
WriteNormal();
WriteInformation("Happy building! 🌟");
return default;
}
}
else

if (build.IsSuccessful &&
HasHighUsage() &&
TryGetValue(() => GitRepository.FromLocalDirectory(NukeBuild.RootDirectory)) is { } repository &&
TryGetValue(() => repository.GetDefaultBranch().GetAwaiter().GetResult()) == null)
{
WriteFailedBuild();
WriteNormal();
WriteSponsorshipInfo();
}
}

private void WriteSponsorshipInfo()
{
WriteInformation("If you like NUKE, you'll love what's coming! πŸ€“");
WriteInformation("We're currently looking for more sponsors to release a new version.");
WriteInformation("Please check out our tiers: https://github.com/sponsors/matkoch");
WriteInformation("With a sponsorship you'll also gain access to various perks. πŸš€");
WriteNormal();
WriteInformation("Happy building! 🌟");
}

protected virtual void WriteSuccessfulBuild()
Expand Down
Loading

0 comments on commit ea81e19

Please sign in to comment.