Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Clean up Build.cs after nuke update
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrofigo committed Dec 18, 2024
1 parent 1c227f2 commit 5a90a47
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.StaticFiles;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NuGet.Versioning;
using Nuke.Common;
using Nuke.Common.ChangeLog;
Expand All @@ -21,23 +18,6 @@
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.IO.PathConstruction;

[GitHubActions(
"build",
GitHubActionsImage.UbuntuLatest,
AutoGenerate = false,
FetchDepth = 0,
OnPushBranches = new[] { "**" },
InvokedTargets = new[] { nameof(Test) },
EnableGitHubToken = true)]
[GitHubActions(
"release",
GitHubActionsImage.UbuntuLatest,
AutoGenerate = false,
FetchDepth = 0,
OnPushTags = new[] { "v[0-9]+.[0-9]+.[0-9]+" },
InvokedTargets = new[] { nameof(PublishGitHubRelease) },
EnableGitHubToken = true,
ImportSecrets = new[] { nameof(NuGetApiKey) })]
class Build : NukeBuild
{
public static int Main() => Execute<Build>(x => x.Pack);
Expand All @@ -48,7 +28,7 @@ class Build : NukeBuild

[Solution(GenerateProjects = true)] readonly Solution Solution;

readonly AbsolutePath PublishDirectory = (AbsolutePath)Path.Combine(RootDirectory, "publish");
readonly AbsolutePath PublishDirectory = Path.Combine(RootDirectory, "publish");

[GitRepository] readonly GitRepository GitRepository;

Expand Down Expand Up @@ -86,7 +66,7 @@ class Build : NukeBuild
.DependsOn(Validate)
.Executes(() =>
{
EnsureCleanDirectory(PublishDirectory);
PublishDirectory.CreateOrCleanDirectory();
DotNetTasks.DotNetClean(s => s
.SetProject(Solution));
});
Expand Down

0 comments on commit 5a90a47

Please sign in to comment.