From edc95c6f4b70fb3036d7333977ba938c9a1a0dd3 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Tue, 12 Nov 2024 22:15:07 +0200 Subject: [PATCH] Use .NET 9 --- .github/workflows/main.yml | 2 +- CliWrap.Tests/CliWrap.Tests.csproj | 2 +- CliWrap.Tests/Utils/Extensions/AssertionExtensions.cs | 5 +---- CliWrap/PipeTarget.cs | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6843bd6c..dd8a7487 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: with: deploy: ${{ inputs.deploy || github.ref_type == 'tag' }} package-version: ${{ inputs.package-version || (github.ref_type == 'tag' && github.ref_name) || format('0.0.0-ci-{0}', github.sha) }} - dotnet-version: 8.0.x + dotnet-version: 9.0.x secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} diff --git a/CliWrap.Tests/CliWrap.Tests.csproj b/CliWrap.Tests/CliWrap.Tests.csproj index 9ad500f4..d00d6dac 100644 --- a/CliWrap.Tests/CliWrap.Tests.csproj +++ b/CliWrap.Tests/CliWrap.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 $(TargetFrameworks);net48 diff --git a/CliWrap.Tests/Utils/Extensions/AssertionExtensions.cs b/CliWrap.Tests/Utils/Extensions/AssertionExtensions.cs index 0d705d3c..5c201242 100644 --- a/CliWrap.Tests/Utils/Extensions/AssertionExtensions.cs +++ b/CliWrap.Tests/Utils/Extensions/AssertionExtensions.cs @@ -9,13 +9,10 @@ internal static class AssertionExtensions { public static void ConsistOfLines( this StringAssertions assertions, - IEnumerable lines + params IEnumerable lines ) => assertions .Subject.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries) .Should() .Equal(lines); - - public static void ConsistOfLines(this StringAssertions assertions, params string[] lines) => - assertions.ConsistOfLines((IEnumerable)lines); } diff --git a/CliWrap/PipeTarget.cs b/CliWrap/PipeTarget.cs index 1034421d..120a225d 100644 --- a/CliWrap/PipeTarget.cs +++ b/CliWrap/PipeTarget.cs @@ -292,7 +292,7 @@ public static PipeTarget ToDelegate(Action handleLine) => /// /// Creates a pipe target that replicates data over multiple inner targets. /// - public static PipeTarget Merge(IEnumerable targets) + public static PipeTarget Merge(params IEnumerable targets) { // This function needs to take output as a parameter because it's recursive static void FlattenTargets(IEnumerable targets, ICollection output) @@ -340,6 +340,7 @@ static IReadOnlyList OptimizeTargets(IEnumerable targets /// /// Creates a pipe target that replicates data over multiple inner targets. /// + // TODO: (breaking change) remove the other overload public static PipeTarget Merge(params PipeTarget[] targets) => Merge((IEnumerable)targets); }