Skip to content

Commit d351953

Browse files
committed
Removed the Clean target because it is currently not needed; Smaller changes
1 parent 3b2baf0 commit d351953

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

src/build/Build.cs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
using Nuke.Common.ProjectModel;
44
using Nuke.Common.Tools.DotNet;
55
using Serilog;
6-
//using System.Collections.Generic;
76

87
namespace BuildTool
98
{
10-
119
class Build : NukeBuild
1210
{
1311
public static int Main() => Execute<Build>(x => x.Pack);
@@ -22,11 +20,9 @@ class Build : NukeBuild
2220
private readonly Configuration _configuration = Configuration.Release;
2321

2422
private static AbsolutePath _packages => RootDirectory / "nuget" / "packages";
25-
private static AbsolutePath _sourceDirectory => RootDirectory / "src";
2623

2724
Target Info => _ => _
2825
.Unlisted()
29-
//.Before(Clean)
3026
.Before(Restore)
3127
.Before(Compile)
3228
.Before(Pack)
@@ -37,20 +33,6 @@ class Build : NukeBuild
3733
Log.Information("Output directory: {dir}", _packages);
3834
});
3935

40-
/*Target Clean => _ => _
41-
.Unlisted()
42-
.Before(Restore)
43-
.Executes(() =>
44-
{*/
45-
//IReadOnlyCollection<AbsolutePath> directories = _sourceDirectory.GlobDirectories("**/bin", "**/obj");
46-
47-
/*foreach (AbsolutePath directory in directories)
48-
{
49-
Log.Information($"{directory}");
50-
directory.DeleteDirectory();
51-
}
52-
});*/
53-
5436
Target Restore => _ => _
5537
.Unlisted()
5638
.Executes(() =>
@@ -60,7 +42,6 @@ class Build : NukeBuild
6042
});
6143

6244
Target Compile => _ => _
63-
//.DependsOn(Clean)
6445
.DependsOn(Restore)
6546
.Executes(() =>
6647
{
@@ -77,6 +58,8 @@ class Build : NukeBuild
7758
{
7859
DotNetTasks.DotNetPack(s => s
7960
.SetProject(Solution.GetProject("WGet.NET"))
61+
.SetConfiguration(_configuration)
62+
.SetNoBuild(true)
8063
.SetOutputDirectory(_packages)
8164
.SetVersion(Version)
8265
.SetFileVersion(Version)

0 commit comments

Comments
 (0)