From e79f702ca0e95f95fdaed17bda23dd20dd78f1c1 Mon Sep 17 00:00:00 2001 From: Jon Galloway Date: Thu, 18 May 2017 14:39:23 -0700 Subject: [PATCH] Create Sign-Package.ps1 --- SignClient/Sign-Package.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 SignClient/Sign-Package.ps1 diff --git a/SignClient/Sign-Package.ps1 b/SignClient/Sign-Package.ps1 new file mode 100644 index 00000000..c39d5fec --- /dev/null +++ b/SignClient/Sign-Package.ps1 @@ -0,0 +1,25 @@ +$currentDirectory = split-path $MyInvocation.MyCommand.Definition + +# See if we have the ClientSecret available +if([string]::IsNullOrEmpty($env:SignClientSecret)){ + Write-Host "Client Secret not found, not signing packages" + return; +} + +# Setup Variables we need to pass into the sign client tool + +$appSettings = "$currentDirectory\appsettings.json" + +$appPath = "$currentDirectory\..\packages\SignClient\tools\SignClient.dll" + +$releases = ls $currentDirectory\..\Releases\*.exe | Select -ExpandProperty FullName + +foreach ($release in $releases){ + Write-Host "Submitting $release for signing" + + dotnet $appPath 'sign' -c $appSettings -i $release -s $env:SignClientSecret -n 'Open Live Writer' -d 'Open Live Writer' -u 'http://openlivewriter.org' + + Write-Host "Finished signing $release" +} + +Write-Host "Sign-package complete"