From e37dd8d43a6724a70557d47d20855c93ca8b5a97 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 17 Dec 2025 23:33:01 +0100 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=93=A6=EF=B8=8F=20updated=20NuGet=20p?= =?UTF-8?q?ackage=20definition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PackageReleaseNotes.txt | 11 ++++++++++- .../Codebelt.Bootstrapper.Web/PackageReleaseNotes.txt | 8 +++++++- .../PackageReleaseNotes.txt | 8 +++++++- .nuget/Codebelt.Bootstrapper/PackageReleaseNotes.txt | 8 +++++++- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.nuget/Codebelt.Bootstrapper.Console/PackageReleaseNotes.txt b/.nuget/Codebelt.Bootstrapper.Console/PackageReleaseNotes.txt index 28daaf4..911d63d 100644 --- a/.nuget/Codebelt.Bootstrapper.Console/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Bootstrapper.Console/PackageReleaseNotes.txt @@ -1,4 +1,13 @@ -Version 5.0.1 +Version 5.0.2 +Availability: .NET 10 and .NET 9 +  +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) +  +# Bug Fixes +- FIXED MinimalConsoleProgram class in the Codebelt.Bootstrapper.Console namespace so it also supports generics like its ConsoleProgram counterpart (but limited to ProgramRoot) +  +Version 5.0.1 Availability: .NET 10 and .NET 9   # ALM diff --git a/.nuget/Codebelt.Bootstrapper.Web/PackageReleaseNotes.txt b/.nuget/Codebelt.Bootstrapper.Web/PackageReleaseNotes.txt index 1fc3cb3..1a14d11 100644 --- a/.nuget/Codebelt.Bootstrapper.Web/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Bootstrapper.Web/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 5.0.1 +Version 5.0.2 +Availability: .NET 10 and .NET 9 +  +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) +  +Version 5.0.1 Availability: .NET 10 and .NET 9   # ALM diff --git a/.nuget/Codebelt.Bootstrapper.Worker/PackageReleaseNotes.txt b/.nuget/Codebelt.Bootstrapper.Worker/PackageReleaseNotes.txt index 1e81aa3..2523134 100644 --- a/.nuget/Codebelt.Bootstrapper.Worker/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Bootstrapper.Worker/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 5.0.1 +Version 5.0.2 +Availability: .NET 10 and .NET 9 +  +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) +  +Version 5.0.1 Availability: .NET 10 and .NET 9   # ALM diff --git a/.nuget/Codebelt.Bootstrapper/PackageReleaseNotes.txt b/.nuget/Codebelt.Bootstrapper/PackageReleaseNotes.txt index 5d25051..db875bf 100644 --- a/.nuget/Codebelt.Bootstrapper/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Bootstrapper/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 5.0.1 +Version 5.0.2 +Availability: .NET 10 and .NET 9 +  +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) +  +Version 5.0.1 Availability: .NET 10 and .NET 9   # ALM From d6c3bc9b4322589773bb20a53a7d85a5f9e24b24 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 17 Dec 2025 23:33:20 +0100 Subject: [PATCH 2/7] :construction_worker: update ci pipeline name and expand test matrix os --- .github/workflows/ci-pipeline.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 04a574e..871ae34 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1,12 +1,7 @@ -name: Bootstrapper Pipeline +name: Bootstrapper CI Pipeline on: pull_request: branches: [main] - paths-ignore: - - .codecov/** - - .docfx/** - - .nuget/** - - '**/*.md' workflow_dispatch: inputs: configuration: @@ -53,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, windows-2022] + os: [ubuntu-24.04, windows-2025, ubuntu-24.04-arm, windows-11-arm] configuration: [Debug, Release] uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3 with: From b9f3b055846d21707cfe9578ba53c2821df6ac16 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 17 Dec 2025 23:33:49 +0100 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=90=9B=20refactor=20MinimalConsolePro?= =?UTF-8?q?gram=20and=20add=20generic=20variant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MinimalConsoleProgram.cs | 30 +++++++-- .../MinimalConsoleProgramTest.cs | 66 +++++++++++++++++++ 2 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs diff --git a/src/Codebelt.Bootstrapper.Console/MinimalConsoleProgram.cs b/src/Codebelt.Bootstrapper.Console/MinimalConsoleProgram.cs index 3849930..2c8903d 100644 --- a/src/Codebelt.Bootstrapper.Console/MinimalConsoleProgram.cs +++ b/src/Codebelt.Bootstrapper.Console/MinimalConsoleProgram.cs @@ -15,20 +15,38 @@ public abstract class MinimalConsoleProgram : ProgramRoot /// /// The command line arguments. /// The initialized . - protected static HostApplicationBuilder CreateHostBuilder(string[] args) + protected static HostApplicationBuilder CreateHostBuilder(string[] args) => CreateHostBuilder(args, typeof(MinimalConsoleProgram)); + + /// + /// A convenient method for executing fire-and-forget code. + /// + /// The to retrieve services from. + /// Indicates that the run has been aborted. + /// A that completes when the execution is finished. + public abstract Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken); + + internal static HostApplicationBuilder CreateHostBuilder(string[] args, Type programType) { var hb = Host.CreateApplicationBuilder(args); hb.UseBootstrapperLifetime(); - hb.UseBootstrapperProgram(typeof(MinimalConsoleProgram)); + hb.UseBootstrapperProgram(programType); hb.UseMinimalConsoleProgram(); return hb; } + } + /// + /// The base entry point of an application optimized for console applications with a specific bootstrap type. + /// + /// The type responsible for the application bootstrap. + /// + public abstract class MinimalConsoleProgram : MinimalConsoleProgram where TProgram : ProgramRoot + { /// - /// A convenient method for executing fire-and-forget code. + /// Creates an used to set up the host. /// - /// The to retrieve services from. - /// Indicates that the run has been aborted. - public abstract Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken); + /// The command line arguments. + /// The initialized . + protected new static HostApplicationBuilder CreateHostBuilder(string[] args) => CreateHostBuilder(args, typeof(TProgram)); } } diff --git a/test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs b/test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs new file mode 100644 index 0000000..9dc47ed --- /dev/null +++ b/test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs @@ -0,0 +1,66 @@ +using Codebelt.Extensions.Xunit; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Xunit.Sdk; + +namespace Codebelt.Bootstrapper.Console +{ + public class MinimalConsoleProgramTest : Test + { + public MinimalConsoleProgramTest(ITestOutputHelper output) : base(output) + { + } + + [Fact] + public void CreateHostBuilder_CreatesHostBuilder() + { + var args = Array.Empty(); + Assert.Throws(() => ProgramNok.Run(args)); + } + + [Fact] + public void CreateHostBuilder_CreatesHostBuilder_Generic() + { + var args = Array.Empty(); + ProgramOk.Run(args); + } + } + + public class ProgramNok : MinimalConsoleProgram + { + public static void Run(string[] args, Action serviceConfigurator = null) + { + var builder = CreateHostBuilder(args); + serviceConfigurator?.Invoke(builder.Services); + using var host = builder.Build(); + host.Run(); + } + + public override Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) + { + return Task.CompletedTask; + } + } + + public class ProgramOk : MinimalConsoleProgram + { + public static void Run(string[] args, Action serviceConfigurator = null) + { + var builder = CreateHostBuilder(args); + serviceConfigurator?.Invoke(builder.Services); + using var host = builder.Build(); + host.Run(); + } + + public override Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) + { + return Task.CompletedTask; + } + } +} From dbcf5d7d1a60155a08b0c3987245c10465f705c4 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 17 Dec 2025 23:34:25 +0100 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=92=AC=20updated=20community=20health?= =?UTF-8?q?=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b128962..5daf117 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), For more details, please refer to `PackageReleaseNotes.txt` on a per assembly basis in the `.nuget` folder. +## [5.0.2] - 2025-12-17 + +This is a service update that primarily focuses on fixing an issue related to MinimalConsoleProgram generics support. + +### Fixed + +- MinimalConsoleProgram class in the Codebelt.Bootstrapper.Console namespace was extended to also supports generics like its ConsoleProgram counterpart (but limited to ProgramRoot) + ## [5.0.1] - 2025-12-07 This is a service update that primarily focuses on fixing issues related to host lifetime status message suppression. diff --git a/README.md b/README.md index 79166ba..097c052 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![Bootstrapper API by Codebelt](.nuget/Codebelt.Bootstrapper/icon.png) # Bootstrapper API by Codebelt -[![bootstrapper CI/CD Pipeline](https://github.com/codebeltnet/bootstrapper/actions/workflows/pipelines.yml/badge.svg)](https://github.com/codebeltnet/bootstrapper/actions/workflows/pipelines.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=alert_status)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=security_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codebeltnet/bootstrapper/badge)](https://scorecard.dev/viewer/?uri=github.com/codebeltnet/bootstrapper) +[![bootstrapper CI/CD Pipeline](https://github.com/codebeltnet/bootstrapper/actions/workflows/ci-pipeline.yml/badge.svg)](https://github.com/codebeltnet/bootstrapper/actions/workflows/pipelines.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=alert_status)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=security_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codebeltnet/bootstrapper/badge)](https://scorecard.dev/viewer/?uri=github.com/codebeltnet/bootstrapper) ## ℹ️ About From c9a3d96067a9f2c7999bfb3e4848a5924ab2906a Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 17 Dec 2025 23:34:51 +0100 Subject: [PATCH 5/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20bump=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Directory.Packages.props | 16 ++++++++-------- testenvironments.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5cafba1..862994c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,9 +4,9 @@ - - - + + + @@ -23,10 +23,10 @@ - - - - - + + + + + \ No newline at end of file diff --git a/testenvironments.json b/testenvironments.json index 44b3749..c4e4ae6 100644 --- a/testenvironments.json +++ b/testenvironments.json @@ -9,7 +9,7 @@ { "name": "Docker-Ubuntu", "type": "docker", - "dockerImage": "gimlichael/ubuntu-testrunner:net8.0.416-9.0.307-10.0.100" + "dockerImage": "gimlichael/ubuntu-testrunner:net8.0.416-9.0.307-10.0.101" } ] } From 57bcf2aa5abef4846d244a8a0f36c2a3cd90c148 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 17 Dec 2025 23:49:13 +0100 Subject: [PATCH 6/7] removed --- .../MinimalConsoleProgramTest.cs | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs diff --git a/test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs b/test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs deleted file mode 100644 index 9dc47ed..0000000 --- a/test/Codebelt.Bootstrapper.Console.FunctionalTests/MinimalConsoleProgramTest.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Codebelt.Extensions.Xunit; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Xunit; -using Xunit.Sdk; - -namespace Codebelt.Bootstrapper.Console -{ - public class MinimalConsoleProgramTest : Test - { - public MinimalConsoleProgramTest(ITestOutputHelper output) : base(output) - { - } - - [Fact] - public void CreateHostBuilder_CreatesHostBuilder() - { - var args = Array.Empty(); - Assert.Throws(() => ProgramNok.Run(args)); - } - - [Fact] - public void CreateHostBuilder_CreatesHostBuilder_Generic() - { - var args = Array.Empty(); - ProgramOk.Run(args); - } - } - - public class ProgramNok : MinimalConsoleProgram - { - public static void Run(string[] args, Action serviceConfigurator = null) - { - var builder = CreateHostBuilder(args); - serviceConfigurator?.Invoke(builder.Services); - using var host = builder.Build(); - host.Run(); - } - - public override Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) - { - return Task.CompletedTask; - } - } - - public class ProgramOk : MinimalConsoleProgram - { - public static void Run(string[] args, Action serviceConfigurator = null) - { - var builder = CreateHostBuilder(args); - serviceConfigurator?.Invoke(builder.Services); - using var host = builder.Build(); - host.Run(); - } - - public override Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) - { - return Task.CompletedTask; - } - } -} From f00c5015791850be89ba315860e8ab1183550b13 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 18 Dec 2025 00:00:56 +0100 Subject: [PATCH 7/7] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 097c052..164a610 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![Bootstrapper API by Codebelt](.nuget/Codebelt.Bootstrapper/icon.png) # Bootstrapper API by Codebelt -[![bootstrapper CI/CD Pipeline](https://github.com/codebeltnet/bootstrapper/actions/workflows/ci-pipeline.yml/badge.svg)](https://github.com/codebeltnet/bootstrapper/actions/workflows/pipelines.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=alert_status)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=security_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codebeltnet/bootstrapper/badge)](https://scorecard.dev/viewer/?uri=github.com/codebeltnet/bootstrapper) +[![bootstrapper CI/CD Pipeline](https://github.com/codebeltnet/bootstrapper/actions/workflows/ci-pipeline.yml/badge.svg)](https://github.com/codebeltnet/bootstrapper/actions/workflows/ci-pipeline.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=alert_status)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bootstrapper&metric=security_rating)](https://sonarcloud.io/dashboard?id=bootstrapper) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codebeltnet/bootstrapper/badge)](https://scorecard.dev/viewer/?uri=github.com/codebeltnet/bootstrapper) ## ℹ️ About