From 7b3cc112db87ff90a6a0bafa11f71d9568686da9 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Fri, 5 Jan 2018 23:40:37 +0100 Subject: [PATCH] Build: sign all files in one step, also sign F# assemblies --- build.fsx | 2 +- build/build-framework.fsx | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/build.fsx b/build.fsx index b0c53a14..bc641843 100644 --- a/build.fsx +++ b/build.fsx @@ -478,7 +478,7 @@ Target "OpenBlasWinTest" DoNothing Target "Sign" (fun _ -> let fingerprint = "5dbea70701b40cab1b2ca62c75401342b4f0f03a" let timeserver = "http://time.certum.pl/" - sign fingerprint timeserver (!! "src/Numerics/bin/Release/**/MathNet.Numerics.dll" )) + sign fingerprint timeserver (!! "src/Numerics/bin/Release/**/MathNet.Numerics.dll" ++ "src/FSharp/bin/Release/**/MathNet.Numerics.FSharp.dll" )) // -------------------------------------------------------------------------------------- diff --git a/build/build-framework.fsx b/build/build-framework.fsx index 1e5e7a28..2581f37c 100644 --- a/build/build-framework.fsx +++ b/build/build-framework.fsx @@ -212,16 +212,15 @@ let provideNuGetExtraFiles path (bundle:Bundle) (pack:Package) = // SIGN let sign fingerprint timeserver files = - files - |> Seq.map (sprintf "\"%s\"") - |> Seq.map (fun file -> sprintf """sign /v /fd sha256 /sha1 "%s" /tr "%s" /td sha256 %s""" fingerprint timeserver file) - |> Seq.iter (fun arguments -> - let result = - ExecProcess (fun info -> - info.FileName <- findToolInSubPath "signtool.exe" """C:\Program Files (x86)\Windows Kits\10\bin\x64""" - info.Arguments <- arguments) TimeSpan.MaxValue - if result <> 0 then - failwithf "Error during SignTool call ") + let fileArgs = files |> Seq.map (sprintf "\"%s\"") |> String.concat " " + let optionsArgs = sprintf """/v /fd sha256 /sha1 "%s" /tr "%s" /td sha256""" fingerprint timeserver + let arguments = sprintf """sign %s %s""" optionsArgs fileArgs + let result = + ExecProcess (fun info -> + info.FileName <- findToolInSubPath "signtool.exe" """C:\Program Files (x86)\Windows Kits\10\bin\x64""" + info.Arguments <- arguments) TimeSpan.MaxValue + if result <> 0 then + failwithf "Error during SignTool call " // ZIP