Browse Source

Build: sign all files in one step, also sign F# assemblies

build
Christoph Ruegg 9 years ago
parent
commit
7b3cc112db
  1. 2
      build.fsx
  2. 19
      build/build-framework.fsx

2
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" ))
// --------------------------------------------------------------------------------------

19
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

Loading…
Cancel
Save