Fix process name
This commit is contained in:
@@ -4,7 +4,11 @@ Param (
|
||||
[String] $Version,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateSet("amd64", "arm64")]
|
||||
[String] $Arch = "amd64"
|
||||
[String] $Arch = "amd64",
|
||||
[Parameter(ParameterSetName='Signing', Mandatory = $false)]
|
||||
[Switch] $Sign = $false,
|
||||
[Parameter(ParameterSetName='Signing', Mandatory = $false)]
|
||||
[String] $CertificateThumbprint
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
@@ -18,6 +22,13 @@ Trap {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
$cert=Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert | Where-Object { $_.Thumbprint -eq $CertificateThumbprint }
|
||||
Get-ChildItem -Path '..\src' | Where-Object {$_.Extension -eq '.ps1'} | ForEach-Object {
|
||||
Copy-Item -Path $_.FullName -Destination "..\engine" -Force
|
||||
if ($Sign) {
|
||||
Set-AuthenticodeSignature -FilePath "..\engine\$($_.Name)" -TimestampServer 'http://time.certum.pl' -Certificate $cert
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose "Creating winbgp-${Version}-${Arch}.msi"
|
||||
$wixArch = @{"amd64" = "x64"; "arm64" = "arm64"}[$Arch]
|
||||
@@ -26,3 +37,9 @@ Invoke-Expression "wix build -arch $wixArch -o .\WinBGP-$($Version)-$($Arch).msi
|
||||
|
||||
Write-Verbose "Done!"
|
||||
Pop-Location
|
||||
|
||||
Copy-Item -Path "WinBGP-$($Version)-$($Arch).msi" -Destination "..\release" -Force
|
||||
if ($Sign) {
|
||||
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe" sign /sha1 $CertificateThumbprint /tr http://time.certum.pl/ /td sha256 /fd sha256 /v "..\release\WinBGP-$($Version)-$($Arch).msi"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user