chore: update windows signing script (#12524)
This commit is contained in:
parent
65b23f112e
commit
bfb26a8af6
|
|
@ -1,20 +1,17 @@
|
||||||
$tempCertFile = New-TemporaryFile
|
$tempCertFile = New-TemporaryFile
|
||||||
|
|
||||||
# Retrieve environment variables for cert/password.
|
|
||||||
$certText = $env:windowsCert
|
$certText = $env:windowsCert
|
||||||
$CertPass = $env:windowsCertPassword
|
|
||||||
|
|
||||||
# Create a Cert object by converting the cert string to bytes.
|
# Create a Cert object by converting the cert string to bytes.
|
||||||
$finalFileName = $tempCertFile.FullName
|
$finalFileName = $tempCertFile.FullName
|
||||||
$certBytes = [Convert]::FromBase64String($certText)
|
$certBytes = [Convert]::FromBase64String($certText)
|
||||||
[System.IO.File]::WriteAllBytes($finalFileName, $certBytes)
|
[System.IO.File]::WriteAllBytes($finalFileName, $certBytes)
|
||||||
$CertPath = $finalFileName
|
$CertPath = $finalFileName
|
||||||
$Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertPath, $CertPass)
|
$Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertPath)
|
||||||
|
|
||||||
# Go through the artifacts directory and sign the 'windows' artifacts.
|
# Go through the artifacts directory and sign the 'windows' artifacts.
|
||||||
$artifactDirectory = "./build/dist"
|
$artifactDirectory = "./build/dist"
|
||||||
$extractDirectory = $artifactDirectory + "\" + "extracted"
|
$extractDirectory = $artifactDirectory + "\" + "extracted"
|
||||||
foreach ($file in get-ChildItem $artifactDirectory | where {$_.name -like "*windows*"} | select name)
|
foreach ($file in get-ChildItem $artifactDirectory | where {$_.name -like "*windows*"} | select name)
|
||||||
{
|
{
|
||||||
$artifact = $artifactDirectory + "\" + $file.Name
|
$artifact = $artifactDirectory + "\" + $file.Name
|
||||||
Expand-Archive -LiteralPath $artifact -DestinationPath $extractDirectory -Force
|
Expand-Archive -LiteralPath $artifact -DestinationPath $extractDirectory -Force
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue