2017-05-18 22:39:23 +01:00
$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 "
2017-11-30 23:28:39 +00:00
$appPath = " $currentDirectory \..\packages\SignClient\tools\netcoreapp2.0\SignClient.dll "
2017-05-18 22:39:23 +01:00
$releases = ls $currentDirectory \ . . \ Releases \ * . exe | Select -ExpandProperty FullName
foreach ( $release in $releases ) {
Write-Host " Submitting $release for signing "
2017-11-30 23:28:39 +00:00
dotnet $appPath 'sign' -c $appSettings -i $release -r $env:SignClientUser -s $env:SignClientSecret -n 'Open Live Writer' -d 'Open Live Writer' -u 'http://openlivewriter.org'
2017-05-18 22:39:23 +01:00
Write-Host " Finished signing $release "
}
Write-Host " Sign-package complete "