From 5a4b56efada4dcbcf5cedf44f4b751cb25375a8f Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Thu, 30 May 2019 20:20:01 -0500 Subject: [PATCH] Update build dependencies --- GitVersion.yml | 1 + build.bat | 2 +- build/Build.cs | 13 ++++++++++--- build/_build.csproj | 6 +++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index 2ad71d6b..5b02fbd3 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,5 +1,6 @@ mode: ContinuousDeployment increment: Patch +next-version: 0.4.0 branches: master: tag: alpha \ No newline at end of file diff --git a/build.bat b/build.bat index 91025f00..add043a3 100644 --- a/build.bat +++ b/build.bat @@ -1 +1 @@ -powershell -ExecutionPolicy Bypass -NoProfile -File .\build.ps1 -configuration Release \ No newline at end of file +powershell -ExecutionPolicy Bypass -NoProfile -File .\build.ps1 -configuration Release %* \ No newline at end of file diff --git a/build/Build.cs b/build/Build.cs index cf2a9fe6..61d16cbd 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -11,6 +11,7 @@ using ILRepacking; using Nuke.Common; using Nuke.Common.BuildServers; using Nuke.Common.Git; +using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitVersion; @@ -95,8 +96,14 @@ namespace LibHacBuild Target Clean => _ => _ .Executes(() => { - DeleteDirectories(GlobDirectories(SourceDirectory, "**/bin", "**/obj")); - DeleteDirectories(GlobDirectories(TestsDirectory, "**/bin", "**/obj")); + List toDelete = GlobDirectories(SourceDirectory, "**/bin", "**/obj") + .Concat(GlobDirectories(TestsDirectory, "**/bin", "**/obj")).ToList(); + + foreach (string dir in toDelete) + { + DeleteDirectory(dir); + } + EnsureCleanDirectory(ArtifactsDirectory); EnsureCleanDirectory(CliCoreDir); EnsureCleanDirectory(CliFrameworkDir); @@ -262,7 +269,7 @@ namespace LibHacBuild Target Publish => _ => _ .DependsOn(Test) .OnlyWhenStatic(() => Host == HostType.AppVeyor) - .OnlyWhenStatic(() => AppVeyor.Instance.PullRequestTitle == null) + .OnlyWhenStatic(() => AppVeyor.Instance != null && AppVeyor.Instance.PullRequestTitle == null) .Executes(() => { AbsolutePath nupkgFile = ArtifactsDirectory.GlobFiles("*.nupkg").Single(); diff --git a/build/_build.csproj b/build/_build.csproj index e50e0e1a..fb9eddc5 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -11,9 +11,9 @@ - - - + + +