Skip to content

Commit

Permalink
Merge branch 'release/9.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Nov 21, 2024
2 parents 245ccad + 0d1dcc1 commit 7d7354d
Show file tree
Hide file tree
Showing 270 changed files with 82,637 additions and 310,377 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/alpha-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Test, Pack, Publish'
run: ./build.cmd Test Pack Publish
- name: 'Run: Publish'
run: ./build.cmd Publish
env:
FeedzNuGetApiKey: ${{ secrets.FEEDZ_NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .run/Publish MSBuildTasks.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish MSBuildTasks" type="RunNativeExe" factoryName="Native Executable">
<option name="EXE_PATH" value="/usr/local/share/dotnet/dotnet" />
<option name="PROGRAM_PARAMETERS" value="publish --framework netcoreapp2.1" />
<option name="PROGRAM_PARAMETERS" value="publish --framework net9.0" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/source/Nuke.MSBuildTasks" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
Expand Down
2 changes: 1 addition & 1 deletion .run/Run MSBuildTasks.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run MSBuildTasks" type="RunExe" factoryName=".NET Executable">
<option name="EXE_PATH" value="/usr/local/share/dotnet/sdk/7.0.100/MSBuild.dll" />
<option name="EXE_PATH" value="/usr/local/share/dotnet/sdk/9.0.100/MSBuild.dll" />
<option name="PROGRAM_PARAMETERS" value="/t:Clean;Restore;Publish;Pack /p:NukeTasksEnabled=True /bl" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/build" />
<option name="PASS_PARENT_ENVS" value="1" />
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [9.0.0] / 2024-11-21
- Removed usages of `BinaryFormatter`
- Changed minimum framework from `net6.0` to `net8.0`

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

Expand Down Expand Up @@ -1174,7 +1178,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.4...HEAD
[vNext]: https://github.com/nuke-build/nuke/compare/9.0.0...HEAD
[9.0.0]: https://github.com/nuke-build/nuke/compare/8.1.4...9.0.0
[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
Expand Down
51 changes: 22 additions & 29 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
<PackageVersion Include="Basic.Reference.Assemblies.NetStandard20" Version="1.7.9" />
<PackageVersion Include="Glob" Version="1.1.9" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.70" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.71" />
<PackageVersion Include="Humanizer" Version="2.14.1" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="9.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="NJsonSchema" Version="11.0.2" />
<PackageVersion Include="NJsonSchema.NewtonsoftJson" Version="11.0.2" />
<PackageVersion Include="NJsonSchema" Version="11.1.0" />
<PackageVersion Include="NJsonSchema.NewtonsoftJson" Version="11.1.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NuGet.Packaging" Version="6.11.1" />
<PackageVersion Include="NuGet.Packaging" Version="6.12.1" />
<PackageVersion Include="Octokit" Version="13.0.1" />
<PackageVersion Include="Serilog" Version="4.1.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="3.0.0" />
Expand All @@ -30,21 +30,21 @@
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="YamlDotNet" Version="16.1.3" />
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
<PackageVersion Include="YamlDotNet" Version="16.2.0" />
<PackageVersion Include="matkoch.spectre.console" Version="0.46.0" />
</ItemGroup>

<!-- Testing -->
<ItemGroup>
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="TeamCity.VSTest.TestAdapter" Version="1.0.41" />
<PackageVersion Include="Verify.Xunit" Version="25.0.2" />
<PackageVersion Include="Verify.DiffPlex" Version="2.3.0" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.2.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<!-- <PackageVersion Include="TeamCity.VSTest.TestAdapter" Version="1.0.41" />-->
<PackageVersion Include="Verify.Xunit" Version="28.3.2" />
<PackageVersion Include="Verify.DiffPlex" Version="3.1.2" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.5.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
Expand All @@ -62,24 +62,17 @@
<ItemGroup>
<PackageVersion Include="Microsoft.Build.Locator" Version="1.7.8" />

<PackageVersion Include="Microsoft.Build" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build" Version="17.12.6" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.12.6" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.12.6" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.12.6" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageVersion Update="Microsoft.Build" Version="17.5.0" />
<PackageVersion Update="Microsoft.Build.Framework" Version="17.5.0" />
<PackageVersion Update="Microsoft.Build.Tasks.Core" Version="17.5.0" />
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="17.5.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageVersion Update="Microsoft.Build" Version="16.9.0" />
<PackageVersion Update="Microsoft.Build.Framework" Version="16.9.0" />
<PackageVersion Update="Microsoft.Build.Tasks.Core" Version="16.9.0" />
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="16.9.0" />
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageVersion Update="Microsoft.Build" Version="17.11.4" />
<PackageVersion Update="Microsoft.Build.Framework" Version="17.11.4" />
<PackageVersion Update="Microsoft.Build.Tasks.Core" Version="17.11.4" />
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="17.11.4" />
</ItemGroup>

</Project>
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,27 @@ NUKE builds and tests itself on several CI/CD services, which helps to ensure a

- [ASP.NET Boilerplate](https://aspnetboilerplate.com/) <sup><a href="https://github.com/aspnetboilerplate/aspnetboilerplate">1</a></sup>
- [AvaloniaUI](https://avaloniaui.net/) <sup><a href="https://github.com/AvaloniaUI/Avalonia">1</a></sup>
- **[Aviva Solutions B.V.](https://www.avivasolutions.nl/)** <sup><a href="https://github.com/avivasolutionsnl/sitecore-commerce-docker">1</a> <a href="https://github.com/avivasolutionsnl/sitecore-docker">2</a></sup>
- [Aviva Solutions B.V.](https://www.avivasolutions.nl/) <sup><a href="https://github.com/avivasolutionsnl/sitecore-commerce-docker">1</a> <a href="https://github.com/avivasolutionsnl/sitecore-docker">2</a></sup>
- [ChilliCream](https://chillicream.com/) <sup><a href="https://github.com/ChilliCream/hotchocolate">1</a></sup>
- [CsvHelper](https://joshclose.github.io/CsvHelper/) <sup><a href="https://github.com/JoshClose/CsvHelper">1</a></sup>
- [DNN Community](https://dnncommunity.org/) <sup><a href="https://github.com/DNNCommunity/Dnn.ModuleCreator">1</a></sup>
- [FluentAssertions](https://fluentassertions.com/) <sup><a href="https://github.com/fluentassertions/fluentassertions">1</a></sup>
- **[JetBrains s.r.o.](https://www.jetbrains.com/)** <sup><a href="https://github.com/JetBrains/space-dotnet-sdk">1</a> <a href="https://github.com/JetBrains/YouTrackSharp">2</a></sup>
- [JetBrains s.r.o.](https://www.jetbrains.com/) <sup><a href="https://github.com/JetBrains/space-dotnet-sdk">1</a> <a href="https://github.com/JetBrains/YouTrackSharp">2</a></sup>
- [NSwag](https://github.com/RicoSuter/NSwag/) <sup><a href="https://github.com/RicoSuter/NSwag/">1</a></sup>
- **[Octopus Deploy Pty. Ltd.](https://www.octopus.com/)** <sup><a href="https://github.com/OctopusDeploy/OctopusTentacle">1</a> <a href="https://github.com/OctopusDeploy/OctopusClients">2</a> <a href="https://github.com/OctopusDeploy/Octodiff">3</a></sup>
- [Octopus Deploy Pty. Ltd.](https://www.octopus.com/) <sup><a href="https://github.com/OctopusDeploy/OctopusTentacle">1</a> <a href="https://github.com/OctopusDeploy/OctopusClients">2</a> <a href="https://github.com/OctopusDeploy/Octodiff">3</a></sup>
- [OmniSharp](http://www.omnisharp.net/) <sup><a href="https://github.com/OmniSharp/csharp-language-server-protocol">1</a></sup>
- [Quartz.NET](https://github.com/quartznet/quartznet) <sup><a href="https://github.com/quartznet/quartznet/">1</a></sup>
- **[VirtoCommerce](https://virtocommerce.com/)** <sup><a href="https://github.com/VirtoCommerce/vc-build/">1</a></sup>
- [VirtoCommerce](https://virtocommerce.com/) <sup><a href="https://github.com/VirtoCommerce/vc-build/">1</a></sup>

## Sponsors

Thanks to all companies, organizations, and individuals who are sponsoring the further development of this project. Your support means a lot! 💙

[<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nuke-build/nuke/develop/images/octopusdeploy-dark.svg"><img alt="Octopus Deploy" height="170px" src="https://raw.githubusercontent.com/nuke-build/nuke/develop/images/octopusdeploy-light.svg"></picture>](https://octopus.com)
[<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nuke-build/nuke/refs/heads/develop/images/octopusdeploy-dark.svg"><img alt="Octopus Deploy" height="170px" src="https://raw.githubusercontent.com/nuke-build/nuke/refs/heads/develop/images/octopusdeploy-light.svg"></picture>](https://octopus.com)

[<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nuke-build/nuke/develop/images/aws-dark.png"><img alt="Amazon Web Services" height="160px" src="https://raw.githubusercontent.com/nuke-build/nuke/develop/images/aws-light.png"></picture>](https://aws.amazon.com/)
[<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nuke-build/nuke/refs/heads/develop/images/aws-dark.png"><img alt="Amazon Web Services" height="160px" src="https://raw.githubusercontent.com/nuke-build/nuke/refs/heads/develop/images/aws-light.png"></picture>](https://aws.amazon.com/)

[<img height="120px" src="https://raw.githubusercontent.com/nuke-build/nuke/refs/heads/develop/images/datadog.svg" alt="Datadog" />](https://datadoghq.com/)

[<img height="60px" src="https://www.dangl-it.de/media/1195/logo-en-rectangular.png" alt="Dangl-IT GmbH" />](https://www.dangl-it.com/)
[<img height="60px" src="https://peiitalliance.com/logos/LevelingUp-Logo.svg" alt="Leveling Up" />](https://github.com/ron-myers)
Expand Down Expand Up @@ -106,7 +108,7 @@ Thanks to all companies, organizations, and individuals who are sponsoring the f

Thanks to [JetBrains](https://jetbrains.com) for providing licenses for [Rider](https://jetbrains.com/rider) and access to a [TeamCity Cloud](https://jetbrains.com/teamcity) instance, which both make open-source development a real pleasure!

[<img src="https://raw.githubusercontent.com/nuke-build/nuke/develop/images/jetbrains.png" width="450" />](https://jetbrains.com/)
[<img src="https://raw.githubusercontent.com/nuke-build/nuke/refs/heads/develop/images/jetbrains.png" width="450" />](https://jetbrains.com/)

Thanks to [SignPath](https://signpath.io?utm_source=foundation&utm_medium=github&utm_campaign=nukebuild) for providing free code signing service and to the [SignPath Foundation](https://signpath.org?utm_source=foundation&utm_medium=github&utm_campaign=nukebuild) for a free code signing certificate.

Expand Down
107 changes: 107 additions & 0 deletions build/AwtrixNotificationsAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Copyright 2024 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using JetBrains.Annotations;
using MQTTnet;
using MQTTnet.Client;
using MQTTnet.Protocol;
using Newtonsoft.Json;
using Nuke.Common;
using Nuke.Common.Execution;

[PublicAPI]
public class AwtrixNotificationsAttribute : BuildExtensionAttributeBase,
IOnBuildCreated,
IOnTargetRunning,
IOnBuildFinished
{
private readonly IMqttClient _mqttClient;

public string MqttHost => EnvironmentInfo.GetVariable("NUKE_AWTRIX_MQTT_HOST");
public int? MqttPort => EnvironmentInfo.GetVariable<int?>("NUKE_AWTRIX_MQTT_PORT").NotNull();
public string MqttTopicPrefix => EnvironmentInfo.GetVariable("NUKE_AWTRIX_MQTT_PREFIX").NotNullOrWhiteSpace();

public AwtrixNotificationsAttribute()
{
if (MqttHost == null)
return;

_mqttClient = new MqttFactory().CreateMqttClient();
_mqttClient.ConnectAsync(new MqttClientOptionsBuilder()
.WithTcpServer(MqttHost, MqttPort)
.Build(),
CancellationToken.None).GetAwaiter().GetResult();
}

public int RunningIconId { get; set; } = 13546;
public int SuccessIconId { get; set; } = 39396;
public int FailureIconId { get; set; } = 8510;
public string ProjectName { get; set; } = "Build";

protected virtual object CreateBuildCreatedPayload()
{
return new
{
icon = RunningIconId,
text = ProjectName,
hold = true,
stack = false,
};
}

protected virtual object CreateTargetRunningPayload(ExecutableTarget target)
{
var progress = (Build.SucceededTargets.Count + Build.FailedTargets.Count) / (double)Build.ExecutionPlan.Count * 100;
return new
{
icon = RunningIconId,
text = target.Name,
progress,
progressC = Build.IsSucceeding ? "#00ff00" : "#ff0000",
progressBC = "#333333",
hold = true,
stack = false,
};
}

protected virtual object CreateBuildFinishedPayload()
{
return new
{
icon = Build.IsSucceeding ? SuccessIconId : FailureIconId,
text = ProjectName,
hold = !Build.IsSucceeding,
stack = false,
};
}

public void OnBuildCreated(IReadOnlyCollection<ExecutableTarget> executableTargets)
{
PublishMqttMessage(CreateBuildCreatedPayload());
}

public void OnTargetRunning(ExecutableTarget target)
{
PublishMqttMessage(CreateTargetRunningPayload(target));
}

public void OnBuildFinished()
{
PublishMqttMessage(CreateBuildFinishedPayload());
}

private void PublishMqttMessage(object payload)
{
_mqttClient?.PublishAsync(new MqttApplicationMessageBuilder()
.WithTopic($"{MqttTopicPrefix}/notify")
.WithPayload(JsonConvert.SerializeObject(payload))
.WithQualityOfServiceLevel(MqttQualityOfServiceLevel.ExactlyOnce)
.Build(),
CancellationToken.None).GetAwaiter().GetResult();
}
}
13 changes: 7 additions & 6 deletions build/Build.Announce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ partial class Build
new (string Text, string Url)[]
{
("Octopus Deploy", "https://octopus.com/"),
("Datadog", "https://datadoghq.com/"),
("Amazon Web Services", "https://aws.amazon.com/"),
};

Expand All @@ -87,14 +88,14 @@ partial class Build
.Executes(async () =>
{
await SendSlackMessageAsync(_ => _
.AddAttachment(_ => _
.AddAttachments(_ => _
.SetFallback(AnnouncementTitle)
.SetAuthorName(AnnouncementTitle)
.SetAuthorLink(AnnouncementLink)
.SetColor($"#{AnnouncementColor:x8}")
.SetThumbUrl(AnnouncementThumbnailUrl)
.SetText(new StringBuilder()
.Append($"<!channel>, this release includes *<{AnnouncementComparisonUrl}|{AnnouncementGitInfo.CommitsText}>*")
.Append($"<!channel>, this new release includes *<{AnnouncementComparisonUrl}|{AnnouncementGitInfo.CommitsText}>*")
.AppendLine(AnnouncementGitInfo.NotableCommmitters.Count > 0
? $" with notable contributions from {AnnouncementGitInfo.NotableCommmitters.JoinCommaAnd()}. A round of applause for them! :clap:"
: ". No contributions this time. :sweat_smile:")
Expand All @@ -117,13 +118,13 @@ await SendSlackMessageAsync(_ => _
{
await SendDiscordMessageAsync(_ => _
.SetContent("@everyone")
.AddEmbed(_ => _
.AddEmbeds(_ => _
.SetTitle(AnnouncementTitle)
.SetColor(AnnouncementColor)
.SetThumbnail(new DiscordEmbedThumbnail()
.SetThumbnail(_ => _
.SetUrl(AnnouncementThumbnailUrl))
.SetDescription(new StringBuilder()
.Append($"This [release]({AnnouncementLink}) includes *[{AnnouncementGitInfo.CommitsText}]({AnnouncementComparisonUrl})*")
.Append($"This new release includes *[{AnnouncementGitInfo.CommitsText}]({AnnouncementComparisonUrl})*")
.AppendLine(AnnouncementGitInfo.NotableCommmitters.Count > 0
? $" with notable contributions from {AnnouncementGitInfo.NotableCommmitters.JoinCommaAnd()}. A round of applause for them! 👏"
: ". No contributions this time. 😅")
Expand All @@ -132,7 +133,7 @@ await SendDiscordMessageAsync(_ => _
.AppendLine()
.AppendLine(AnnouncementReleaseNotes).ToString()
.Replace("*", "**"))
.SetFooter(new DiscordEmbedFooter()
.SetFooter(_ => _
.SetText($"Powered by {AnnouncementSponsors.Select(x => x.Text).JoinCommaAnd()}.")
.SetIconUrl("https://cdn.discordapp.com/emojis/674275938757771306.webp?size=240&quality=lossless"))),
DiscordWebhook);
Expand Down
Loading

0 comments on commit 7d7354d

Please sign in to comment.