From 99e25e768a681e37fcefc4fa1b1b895d414cfc33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=81=CE=B9=D1=82=D1=94=D1=8F=20=D0=BC=CE=B1=D1=8F=CF=87?= Date: Fri, 26 Jun 2026 12:08:37 +0100 Subject: [PATCH 1/3] update cake --- .github/workflows/dotnet.yml | 2 +- build/build.csproj | 2 +- src/Cake.Console/Cake.Console.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 78560ed..b509366 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -22,7 +22,7 @@ jobs: env: PUSH_SOURCE: https://api.nuget.org/v3/index.json NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - VersionPrefix: 5.0.0 + VersionPrefix: 6.0.0-pre1 - uses: actions/upload-artifact@v4 with: name: snaps diff --git a/build/build.csproj b/build/build.csproj index f8628ce..97120ec 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -9,6 +9,6 @@ - + diff --git a/src/Cake.Console/Cake.Console.csproj b/src/Cake.Console/Cake.Console.csproj index 3ef53a1..893d966 100644 --- a/src/Cake.Console/Cake.Console.csproj +++ b/src/Cake.Console/Cake.Console.csproj @@ -1,7 +1,7 @@ - 5.0.0 + 6.2.0 From 7bf3d97f198f99f014fb3bd5f5e5eb97b67793ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=81=CE=B9=D1=82=D1=94=D1=8F=20=D0=BC=CE=B1=D1=8F=CF=87?= Date: Fri, 26 Jun 2026 12:17:05 +0100 Subject: [PATCH 2/3] fix compilation --- src/Cake.Console/CommandApp/CakeCliCommand.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Cake.Console/CommandApp/CakeCliCommand.cs b/src/Cake.Console/CommandApp/CakeCliCommand.cs index 1b87a49..9d1be55 100644 --- a/src/Cake.Console/CommandApp/CakeCliCommand.cs +++ b/src/Cake.Console/CommandApp/CakeCliCommand.cs @@ -58,8 +58,7 @@ public sealed class Settings : CommandSettings [Description("Displays additional information about Cake.")] public bool Info { get; set; } } - - public override int Execute([NotNull] CommandContext context, [NotNull] Settings settings) + protected override int Execute(CommandContext context, Settings settings, CancellationToken cancellation) { if (settings.Info) { From b51efb467372693f070ba7965435f48d73f833ab Mon Sep 17 00:00:00 2001 From: pitermarx Date: Fri, 26 Jun 2026 12:30:02 +0100 Subject: [PATCH 3/3] fix snapshots --- build/program.cs | 29 ++++++++++--------- ...ng-arg=super-long-value,hello.verified.txt | 6 ++-- .../Test_cli_--target=task1.verified.txt | 6 ++-- ..._--target=task1_-v=Diagnostic.verified.txt | 6 ++-- .../Test_cli_--target=task2.verified.txt | 6 ++-- .../Test_cli_--target=taskB.verified.txt | 6 ++-- ...li_--target=taskB_--exclusive.verified.txt | 6 ++-- build/snapshots/Test_host.verified.txt | 6 ++-- 8 files changed, 37 insertions(+), 34 deletions(-) diff --git a/build/program.cs b/build/program.cs index 58473c3..8b8eac9 100644 --- a/build/program.cs +++ b/build/program.cs @@ -32,8 +32,7 @@ { Configuration = config, NoLogo = true, - ArgumentCustomization = builder => - builder.Append($"/p:VersionPrefix={version}"), + ArgumentCustomization = builder => builder.Append($"/p:VersionPrefix={version}"), }; c.DotNetBuild(testProj, sett); }); @@ -62,9 +61,9 @@ "cli --tree", "cli --help", "cli -h", - "cli --target=printargs --arg1=1 --arg2=x --super-long-arg=super-long-value,hello" + "cli --target=printargs --arg1=1 --arg2=x --super-long-arg=super-long-value,hello", ]; - + List aggException = []; foreach (var t in tests) { @@ -77,12 +76,16 @@ } s.ScrubLinesContaining(StringComparison.OrdinalIgnoreCase, "00:00:0"); s.ScrubLinesWithReplace(l => l.Replace(pwd, "{CurrentDirectory}")); - s.ScrubLinesWithReplace(l => l.Replace("\u001b[1m","").Replace("\u001b[0m", "")); + s.ScrubLinesWithReplace(l => l.Replace("\u001b[1m", "").Replace("\u001b[0m", "")); s.ScrubLinesWithReplace(l => new Regex(@"Details: 1\.2\.3\+.*").Replace(l, "Details: 1.2.3+{Hash}") ); var result = Run(t); - await new InnerVerifier("build\\snapshots", $"Test_{t.Replace(" ", "_")}", s).Verify(result); + await new InnerVerifier( + "build\\snapshots", + $"Test_{t.Replace(" ", "_")}", + s + ).Verify(result); } catch (Exception e) { @@ -115,9 +118,9 @@ host.Task("Push") .WithCriteria(c => - c.GitHubActions().IsRunningOnGitHubActions && - !c.GitHubActions().Environment.PullRequest.IsPullRequest && - c.HasEnvironmentVariable("NUGET_API_KEY") + c.GitHubActions().IsRunningOnGitHubActions + && !c.GitHubActions().Environment.PullRequest.IsPullRequest + && c.HasEnvironmentVariable("NUGET_API_KEY") ) .IsDependentOn("Pack") .Does(c => @@ -144,21 +147,21 @@ string Run(string cmd) .Context.GetFiles("src/Cake.Console.Tests/bin/Release/*/Cake.Console.Tests.dll") .First(); host.Context.Information($"Running: dotnet {dll} {cmd}"); - + // run cmd and get stdout/stderr using Process process = new(); - process.StartInfo = new ("dotnet", $"{dll} {cmd}") + process.StartInfo = new("dotnet", $"{dll} {cmd}") { RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false, CreateNoWindow = true, WorkingDirectory = Environment.CurrentDirectory, - Environment = { {"NO_COLOR", "true"} } + Environment = { { "NO_COLOR", "true" } }, }; process.Start(); - + var output = process.StandardOutput.ReadToEnd().Trim(); output += process.StandardError.ReadToEnd(); diff --git a/build/snapshots/Test_cli_--target=printargs_--arg1=1_--arg2=x_--super-long-arg=super-long-value,hello.verified.txt b/build/snapshots/Test_cli_--target=printargs_--arg1=1_--arg2=x_--super-long-arg=super-long-value,hello.verified.txt index 69598ae..70e1214 100644 --- a/build/snapshots/Test_cli_--target=printargs_--arg1=1_--arg2=x_--super-long-arg=super-long-value,hello.verified.txt +++ b/build/snapshots/Test_cli_--target=printargs_--arg1=1_--arg2=x_--super-long-arg=super-long-value,hello.verified.txt @@ -12,7 +12,7 @@ PrintArgs verbosity=Normal --SomeVeryImportantData=Cake is awesome! -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file diff --git a/build/snapshots/Test_cli_--target=task1.verified.txt b/build/snapshots/Test_cli_--target=task1.verified.txt index cf245a0..1bec536 100644 --- a/build/snapshots/Test_cli_--target=task1.verified.txt +++ b/build/snapshots/Test_cli_--target=task1.verified.txt @@ -3,7 +3,7 @@ Task1 ======================================== Task1 executed -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file diff --git a/build/snapshots/Test_cli_--target=task1_-v=Diagnostic.verified.txt b/build/snapshots/Test_cli_--target=task1_-v=Diagnostic.verified.txt index 4a417d0..dfc701c 100644 --- a/build/snapshots/Test_cli_--target=task1_-v=Diagnostic.verified.txt +++ b/build/snapshots/Test_cli_--target=task1_-v=Diagnostic.verified.txt @@ -17,7 +17,7 @@ Executing task: Task1 Task1 executed Finished executing task: Task1 -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file diff --git a/build/snapshots/Test_cli_--target=task2.verified.txt b/build/snapshots/Test_cli_--target=task2.verified.txt index 7a42b69..b8a1026 100644 --- a/build/snapshots/Test_cli_--target=task2.verified.txt +++ b/build/snapshots/Test_cli_--target=task2.verified.txt @@ -3,7 +3,7 @@ Task2 ======================================== Task2 executed -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file diff --git a/build/snapshots/Test_cli_--target=taskB.verified.txt b/build/snapshots/Test_cli_--target=taskB.verified.txt index 75ddef9..f996a77 100644 --- a/build/snapshots/Test_cli_--target=taskB.verified.txt +++ b/build/snapshots/Test_cli_--target=taskB.verified.txt @@ -8,7 +8,7 @@ TaskB ======================================== TaskB executed -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file diff --git a/build/snapshots/Test_cli_--target=taskB_--exclusive.verified.txt b/build/snapshots/Test_cli_--target=taskB_--exclusive.verified.txt index b37ab41..1d69156 100644 --- a/build/snapshots/Test_cli_--target=taskB_--exclusive.verified.txt +++ b/build/snapshots/Test_cli_--target=taskB_--exclusive.verified.txt @@ -3,7 +3,7 @@ TaskB ======================================== TaskB executed -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file diff --git a/build/snapshots/Test_host.verified.txt b/build/snapshots/Test_host.verified.txt index ef583ad..794c59d 100644 --- a/build/snapshots/Test_host.verified.txt +++ b/build/snapshots/Test_host.verified.txt @@ -8,7 +8,7 @@ Task1 ======================================== Task1 executed -Task Duration --------------------------------------------------- --------------------------------------------------- +Task Duration Status +---------------------------------------------------------------------- +---------------------------------------------------------------------- OK \ No newline at end of file