Skip to content

Commit

Permalink
Fixed signtool detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Aug 6, 2024
1 parent 64aa735 commit d971501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sign.assembly.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ if ($env:CI -eq "true") {
}

$cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
if ($cert -eq $null) {
if ($null -eq $cert) {
Write-Host "No code signing certificate found in MY store. Exit."
exit 1
}

$signtool = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits" -Recurse -Filter "signtool.exe" | Select-Object -First 1 -ExpandProperty FullName
$signtool = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits" -Recurse -Filter "signtool.exe" | Select-Object -First 1 -ExpandProperty FullName
Write-host "Signtool path: $signtool"
if (Test-Path $signtool) {
Write-Output "sign the assembly"
Expand Down
2 changes: 1 addition & 1 deletion sign3.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if ($env:CI -eq "true") {
exit 0
}

$signtool = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits" -Recurse -Filter "signtool.exe" | Select-Object -First 1 -ExpandProperty FullName
$signtool = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits" -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
Expand Down

0 comments on commit d971501

Please sign in to comment.