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/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
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
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)
{