From 35b25286fd2551b7d2be063f2f814c8a903aca9f Mon Sep 17 00:00:00 2001 From: Simon Oxtoby Date: Sat, 27 Jan 2024 12:13:32 +1000 Subject: [PATCH] Updating build project --- appveyor.yml | 2 +- build/Build.cs | 11 +++++------ build/_build.csproj | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 61eb87de..f41e9943 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,4 +22,4 @@ build_script: - sh: ./build.cmd Test Pack artifacts: - - path: output/*.nupkg + - path: 'output/*.nupkg' diff --git a/build/Build.cs b/build/Build.cs index 8f731d29..db16afe5 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -8,12 +8,11 @@ using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitVersion; using Serilog; -using static Nuke.Common.IO.FileSystemTasks; using static Nuke.Common.Tools.DotNet.DotNetTasks; [DotNetVerbosityMapping] [ShutdownDotNetAfterServerBuild] -[AppVeyor(AppVeyorImage.VisualStudioLatest, InvokedTargets = new[] { nameof(Test), nameof(Pack) })] +[AppVeyor(AppVeyorImage.VisualStudioLatest, InvokedTargets = [nameof(Test), nameof(Pack)])] class Build : NukeBuild { public static int Main() => Execute(x => x.Compile); @@ -31,8 +30,8 @@ class Build : NukeBuild .Executes(() => { foreach (var dir in RootDirectory.GlobDirectories("**/bin", "**/obj").Except(RootDirectory.GlobDirectories("build/**"))) - EnsureCleanDirectory(dir); - EnsureCleanDirectory(OutputDirectory); + dir.CreateOrCleanDirectory(); + OutputDirectory.CreateOrCleanDirectory(); }); Target Restore => _ => _ @@ -90,7 +89,7 @@ class Build : NukeBuild }); static readonly string[] ExpectedPackages = - { + [ "SlackNet", "SlackNet.AspNetCore", "SlackNet.Autofac", @@ -98,5 +97,5 @@ class Build : NukeBuild "SlackNet.Bot", "SlackNet.Extensions.DependencyInjection", "SlackNet.SimpleInjector" - }; + ]; } \ No newline at end of file diff --git a/build/_build.csproj b/build/_build.csproj index fcf5bf7f..2adb4425 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -14,7 +14,7 @@ - +