From 6c425ec0e8db8ec8a841d3fd5a5e488ff2ce6779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 31 Oct 2024 09:45:44 +0100 Subject: [PATCH] Revert "Update Nuke" This reverts commit 72e7a9cd48285abf396c7847a8f7403078e3e7f6. --- Directory.Packages.props | 2 +- build/build/Build.cs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 32a33670..e6fd1aae 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,6 +16,6 @@ - + diff --git a/build/build/Build.cs b/build/build/Build.cs index ba213d2c..b89d8756 100644 --- a/build/build/Build.cs +++ b/build/build/Build.cs @@ -5,6 +5,7 @@ using Nuke.Common.Tools.DotNet; using Nuke.Common.IO; using static Nuke.Common.IO.FileSystemTasks; +using static Nuke.Common.IO.PathConstruction; using static Nuke.Common.Tools.DotNet.DotNetTasks; class Build : NukeBuild @@ -47,7 +48,7 @@ protected override void OnBuildInitialized() VersionSuffix = VersionSuffix ?? ""; } - private void DeleteDirectories(IReadOnlyCollection directories) + private void DeleteDirectories(IReadOnlyCollection directories) { foreach (var directory in directories) { @@ -58,9 +59,9 @@ private void DeleteDirectories(IReadOnlyCollection directories) Target Clean => _ => _ .Executes(() => { - DeleteDirectories(SourceDirectory.GlobDirectories("**/bin", "**/obj")); - DeleteDirectories(TestsDirectory.GlobDirectories("**/bin", "**/obj")); - ArtifactsDirectory.CreateOrCleanDirectory(); + DeleteDirectories(GlobDirectories(SourceDirectory, "**/bin", "**/obj")); + DeleteDirectories(GlobDirectories(TestsDirectory, "**/bin", "**/obj")); + EnsureCleanDirectory(ArtifactsDirectory); }); Target Restore => _ => _