File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,12 +23,9 @@ let nugetDir = @".\nuget\"
2323let 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
3330let 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+
5150Target " 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
5958Target " 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"
You can’t perform that action at this time.
0 commit comments