Skip to content

Commit dd1d1ce

Browse files
Florian KrönertFlorian Krönert
authored andcommitted
Changed version building
1 parent 843485f commit dd1d1ce

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

build.fsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@ let nugetDir = @".\nuget\"
2323
let packagesDir = @".\packages\"
2424

2525
// version info
26-
let mutable majorversion = "1"
27-
let mutable minorversion = "1"
28-
let mutable build = "0"
29-
let mutable nugetVersion = ""
30-
let mutable asmVersion = ""
31-
let mutable asmInfoVersion = ""
26+
let majorversion = 1
27+
let minorversion = 1
28+
let patch = 0
3229

3330
let sha = Git.Information.getCurrentHash()
3431

@@ -48,12 +45,14 @@ Target "RestorePackages" (fun _ ->
4845
RestorePackages2()
4946
)
5047

48+
let getVersion() = sprintf "%i.%i.%i" majorversion minorversion patch
49+
5150
Target "AssemblyInfo" (fun _ ->
5251
BulkReplaceAssemblyInfoVersions "src" (fun f ->
5352
{f with
54-
AssemblyVersion = asmVersion
55-
AssemblyInformationalVersion = asmInfoVersion
56-
AssemblyFileVersion = asmVersion})
53+
AssemblyVersion = getVersion()
54+
AssemblyInformationalVersion = getVersion()
55+
AssemblyFileVersion = getVersion()})
5756
)
5857

5958
Target "BuildLib" (fun _ ->
@@ -75,7 +74,7 @@ Target "CreateNuget" (fun _ ->
7574
{p with
7675
Authors = authors
7776
Project = projectName
78-
Version = nugetVersion
77+
Version = getVersion()
7978
NoPackageAnalysis = true
8079
Description = projectDescription
8180
ToolPath = @".\tools\Nuget\Nuget.exe"

0 commit comments

Comments
 (0)