Skip to content

Commit 782e029

Browse files
committed
Fixed the version number not being set by the build tool; Code cleanup in the build tool
1 parent e532a67 commit 782e029

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/build/Build.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ class Build : NukeBuild
3232

3333
Target Info => _ => _
3434
.Unlisted()
35-
.Before(Restore)
36-
.Before(Compile)
37-
.Before(Pack)
35+
.Before(Restore, Compile, Pack)
3836
.Executes(() =>
3937
{
4038
Log.Information("Creating \"WGet.NET\" nuget package");
@@ -57,12 +55,14 @@ class Build : NukeBuild
5755
DotNetTasks.DotNetBuild(s => s
5856
.SetProjectFile(Solution.GetProject("WGet.NET"))
5957
.SetConfiguration(_configuration)
60-
.EnableNoRestore());
58+
.EnableNoRestore()
59+
.SetVersion(Version)
60+
.SetFileVersion(Version)
61+
.SetAssemblyVersion(Version));
6162
});
6263

6364
Target Pack => _ => _
64-
.DependsOn(Info)
65-
.DependsOn(Compile)
65+
.DependsOn(Info, Compile)
6666
.Triggers(Docs)
6767
.Executes(() =>
6868
{
@@ -78,6 +78,7 @@ class Build : NukeBuild
7878
});
7979

8080
Target Docs => _ => _
81+
.Unlisted()
8182
.OnlyWhenDynamic(() => !NoDocs)
8283
.Executes(() =>
8384
{

0 commit comments

Comments
 (0)