-
Notifications
You must be signed in to change notification settings - Fork 151
/
sign3.ps1
28 lines (26 loc) · 1.09 KB
/
sign3.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if ($env:CI -eq "true") {
exit 0
}
$signtool = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits", "${env:ProgramFiles(x86)}\Microsoft SDKs" -Recurse -Filter "signtool.exe" | Select-Object -First 1 -ExpandProperty FullName
Write-host "Signtool path: $signtool"
if (Test-Path $signtool) {
New-Item -ItemType Directory -Path ".\SharpSnmpLib\bin\Release" -Force | Out-Null
Set-Location -Path ".\SharpSnmpLib\bin\Release"
Get-ChildItem -Recurse -Include *.exe, *.dll | ForEach-Object {
& $signtool verify /pa /q $_.FullName
if ($LASTEXITCODE -ne 0) {
Read-Host "Press Enter to continue..."
}
}
Set-Location -Path "..\..\.."
New-Item -ItemType Directory -Path ".\SharpSnmpLib.BouncyCastle\bin\Release" -Force | Out-Null
Set-Location -Path ".\SharpSnmpLib.BouncyCastle\bin\Release"
Get-ChildItem -Recurse -Include *.exe, *.dll | ForEach-Object {
& $signtool verify /pa /q $_.FullName
if ($LASTEXITCODE -ne 0) {
Read-Host "Press Enter to continue..."
}
}
Set-Location -Path "..\..\.."
}
Exit 0