Create Sign-Package.ps1

This commit is contained in:
Jon Galloway 2017-05-18 14:39:23 -07:00 committed by GitHub
parent af9a18d2b5
commit e79f702ca0
1 changed files with 25 additions and 0 deletions

View File

@ -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"