Skip to content

Commit

Permalink
updated nuke
Browse files Browse the repository at this point in the history
  • Loading branch information
seayxu committed Dec 15, 2023
1 parent fe0c012 commit 23b822e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions nuke/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ protected override void OnBuildInitialized()
SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => x.DeleteDirectory());
ArtifactsDirectory.CreateOrCleanDirectory();
});

Target Restore => _ => _
.Description("Restore Solution")
.DependsOn(Initial)
.Executes(() =>
{
DotNetRestore(s => s
.SetProjectFile(Solution)
);
});

// Target Compile => _ => _
// .Description("Compile Projects")
Expand All @@ -85,15 +95,14 @@ protected override void OnBuildInitialized()

Target Pack => _ => _
.Description("Pack Projects")
.DependsOn(Clean)
.DependsOn(Restore)
.Executes(() =>
{
DotNetPack(p => p
.SetProject(Solution)
.SetConfiguration(Configuration)
.SetVersion(Version)
.SetNoBuild(true)
.SetNoRestore(true)
.EnableContinuousIntegrationBuild()
);
});
Expand Down

0 comments on commit 23b822e

Please sign in to comment.