From 0bf67ea4a480f9f0bd5a652dffbdfe669c54cd1a Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Fri, 13 Jun 2014 18:41:55 +0200 Subject: [PATCH] Build: dedicated release notes and auto-version for native providers --- MathNet.Numerics.All.sln | 1 + MathNet.Numerics.Portable.sln | 1 + MathNet.Numerics.sln | 1 + README.md | 4 ---- RELEASENOTES-Native.md | 3 +++ build.fsx | 35 ++++++++++++++++++++++++++++++++--- docs/content/index.fsx | 4 ---- 7 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 RELEASENOTES-Native.md diff --git a/MathNet.Numerics.All.sln b/MathNet.Numerics.All.sln index 1e4c803c..fc5894c1 100644 --- a/MathNet.Numerics.All.sln +++ b/MathNet.Numerics.All.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Readme", "Readme", "{C2F374 LICENSE.md = LICENSE.md MAINTAINING.md = MAINTAINING.md README.md = README.md + RELEASENOTES-Native.md = RELEASENOTES-Native.md RELEASENOTES.md = RELEASENOTES.md EndProjectSection EndProject diff --git a/MathNet.Numerics.Portable.sln b/MathNet.Numerics.Portable.sln index 23735c87..da7539ae 100644 --- a/MathNet.Numerics.Portable.sln +++ b/MathNet.Numerics.Portable.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Readme", "Readme", "{C2F374 LICENSE.md = LICENSE.md MAINTAINING.md = MAINTAINING.md README.md = README.md + RELEASENOTES-Native.md = RELEASENOTES-Native.md RELEASENOTES.md = RELEASENOTES.md EndProjectSection EndProject diff --git a/MathNet.Numerics.sln b/MathNet.Numerics.sln index 868d1e49..8560c1ea 100644 --- a/MathNet.Numerics.sln +++ b/MathNet.Numerics.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Readme", "Readme", "{C2F374 LICENSE.md = LICENSE.md MAINTAINING.md = MAINTAINING.md README.md = README.md + RELEASENOTES-Native.md = RELEASENOTES-Native.md RELEASENOTES.md = RELEASENOTES.md EndProjectSection EndProject diff --git a/README.md b/README.md index 01eff203..df09a7b0 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,7 @@ If you do not want to use the official binaries, or if you like to modify, debug build.cmd NuGet all # generate normal NuGet packages (.Net 4.0, 3.5, PCL) build.cmd NuGet signed # generate signed/strong named NuGet packages (.Net 4.0) - build.cmd Native32Build # build native providers 32bit/x86 - build.cmd Native64Build # build native providers 64bit/x64 build.cmd NativeBuild # build native providers for all platforms - build.cmd Native32Test # test native providers 32bit/x86 - build.cmd Native64Test # test native providers 64bit/x64 build.cmd NativeTest # test native providers for all platforms build.cmd All # build, test, docs, api reference (.Net 4.0) diff --git a/RELEASENOTES-Native.md b/RELEASENOTES-Native.md new file mode 100644 index 00000000..43b71897 --- /dev/null +++ b/RELEASENOTES-Native.md @@ -0,0 +1,3 @@ +### 1.4.0 - 2014-03-01 +* Build against Intel MKL 11.1 Update 2 +* Capability querying support diff --git a/build.fsx b/build.fsx index 3f351e4d..c6f8626b 100644 --- a/build.fsx +++ b/build.fsx @@ -22,6 +22,7 @@ open Fake open Fake.DocuHelper open Fake.AssemblyInfoFile open Fake.ReleaseNotesHelper +open Fake.StringHelper open System Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ @@ -60,7 +61,7 @@ type Package = Files : (string * string option * string option) list } let release = LoadReleaseNotes "RELEASENOTES.md" -let buildPart = "0" // TODO: Fetch from TC +let buildPart = "0" let assemblyVersion = release.AssemblyVersion + "." + buildPart let packageVersion = release.NugetVersion let releaseNotes = release.Notes |> List.map (fun l -> l.Replace("*","").Replace("`","")) |> toLines @@ -174,8 +175,28 @@ Target "Test" (fun _ -> test !! "out/test/**/*UnitTests*.dll") // Requires a local installation of Intel MKL // -------------------------------------------------------------------------------------- +// PROJECT INFO + +let nativeRelease = LoadReleaseNotes "RELEASENOTES-Native.md" +let nativeBuildPart = "0" +let nativeAssemblyVersion = nativeRelease.AssemblyVersion + "." + nativeBuildPart +let nativePackageVersion = nativeRelease.NugetVersion +let nativeReleaseNotes = nativeRelease.Notes |> List.map (fun l -> l.Replace("*","").Replace("`","")) |> toLines + + +// VERSION + +Target "NativeVersion" (fun _ -> + ReplaceInFile + (regex_replace "\d+\.\d+\.\d+\.\d+" nativeAssemblyVersion + >> regex_replace "\d+,\d+,\d+,\d+" (replace "." "," nativeAssemblyVersion)) + "src/NativeProviders/Common/resource.rc") + + // BUILD +Target "NativeClean" (fun _ -> CleanDirs [ "out/MKL"; "out/ATLAS" ] ) + let native32Build subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [("Configuration","Release"); ("Platform","Win32")] subject |> ignore let native64Build subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [("Configuration","Release"); ("Platform","x64")] subject |> ignore @@ -183,8 +204,16 @@ Target "Native32Build" (fun _ -> native32Build !! "MathNet.Numerics.NativeProvid Target "Native64Build" (fun _ -> native64Build !! "MathNet.Numerics.NativeProviders.sln") Target "NativeBuild" DoNothing -"Prepare" ==> "Native32Build" ==> "NativeBuild" -"Prepare" ==> "Native64Build" ==> "NativeBuild" +"Prepare" + =?> ("NativeClean", not (hasBuildParam "incremental")) + ==> "NativeVersion" + ==> "Native32Build" + ==> "NativeBuild" +"Prepare" + =?> ("NativeClean", not (hasBuildParam "incremental")) + ==> "NativeVersion" + ==> "Native64Build" + ==> "NativeBuild" // TEST diff --git a/docs/content/index.fsx b/docs/content/index.fsx index 1c77b66b..52ff810a 100644 --- a/docs/content/index.fsx +++ b/docs/content/index.fsx @@ -223,11 +223,7 @@ If you do not want to use the official binaries, or if you like to modify, debug build.cmd NuGet all # generate normal NuGet packages (.Net 4.0, 3.5, PCL) build.cmd NuGet signed # generate signed/strong named NuGet packages (.Net 4.0) - build.cmd Native32Build # build native providers 32bit/x86 - build.cmd Native64Build # build native providers 64bit/x64 build.cmd NativeBuild # build native providers for all platforms - build.cmd Native32Test # test native providers 32bit/x86 - build.cmd Native64Test # test native providers 64bit/x64 build.cmd NativeTest # test native providers for all platforms build.cmd All # build, test, docs, api reference (.Net 4.0)