Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use collection expressions in Cake script #2006

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ Teardown(_ =>
Task("__Clean")
.Does(() =>
{
CleanDirectories(new[]
{
CleanDirectories(
[
testResultsDir,
nupkgDestDir,
artifactsDir,
strykerOutput
});
]);

foreach (var path in solutionPaths)
{
Expand Down Expand Up @@ -114,8 +114,8 @@ Task("__BuildSolutions")
},
};

dotNetBuildSettings.MSBuildSettings.Properties["ContinuousIntegrationBuild"] = new[] { Environment.GetEnvironmentVariable("CI") ?? "false" };
dotNetBuildSettings.MSBuildSettings.Properties["Deterministic"] = new[] { "true" };
dotNetBuildSettings.MSBuildSettings.Properties["ContinuousIntegrationBuild"] = [Environment.GetEnvironmentVariable("CI") ?? "false"];
dotNetBuildSettings.MSBuildSettings.Properties["Deterministic"] = ["true"];

DotNetBuild(solution.ToString(), dotNetBuildSettings);
}
Expand Down Expand Up @@ -145,7 +145,7 @@ Task("__RunTests")

if (!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("GITHUB_SHA")))
{
loggers = new[] { "GitHubActions;report-warnings=false" };
loggers = ["GitHubActions;report-warnings=false"];
}

var projects = GetFiles("./test/**/*.csproj");
Expand All @@ -157,8 +157,6 @@ Task("__RunTests")
Configuration = configuration,
Loggers = loggers,
NoBuild = true,
// Commented, because it causes random crashes on Windows
// ArgumentCustomization = args => args.Append($"--blame-hang-timeout 10s")
});
}
});
Expand Down Expand Up @@ -229,14 +227,14 @@ Task("__CreateNuGetPackages")
},
};

var packages = new[]
{
string[] packages =
[
System.IO.Path.Combine(srcDir, "Polly.Core", "Polly.Core.csproj"),
System.IO.Path.Combine(srcDir, "Polly", "Polly.csproj"),
System.IO.Path.Combine(srcDir, "Polly.RateLimiting", "Polly.RateLimiting.csproj"),
System.IO.Path.Combine(srcDir, "Polly.Extensions", "Polly.Extensions.csproj"),
System.IO.Path.Combine(srcDir, "Polly.Testing", "Polly.Testing.csproj"),
};
];

Information("Building NuGet packages");

Expand Down