mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Trying a different way for the password / certificate.
This commit is contained in:
parent
8660ee6591
commit
00532fb052
2 changed files with 4 additions and 13 deletions
14
build.ps1
14
build.ps1
|
@ -36,6 +36,7 @@ $gitcommit=$env:APPVEYOR_REPO_COMMIT
|
|||
if ( !$gitcommit ) {
|
||||
$gitcommit = "abcdefghijklmnopqrstuvwxy"
|
||||
}
|
||||
|
||||
$gitcommit=$gitcommit.SubString(0, [math]::Min($gitcommit.Length, 7))
|
||||
$detailversion=$version + '-' + $gitcommit + " " + $buildType
|
||||
$release=(([version]$version).build) % 2 -eq 1
|
||||
|
@ -51,16 +52,6 @@ Function MD5($filename) {
|
|||
return [System.BitConverter]::ToString($hash) -replace "-", ""
|
||||
}
|
||||
|
||||
# Write the certificate to the file system, so signtool can use it
|
||||
Function PrepareCertificate() {
|
||||
$decodedContentBytes = [System.Convert]::FromBase64String($env:Certificate)
|
||||
$decodedContentBytes | set-content "greenshot.pfx" -encoding byte
|
||||
#$certutilArguments = @('-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
|
||||
#Start-Process -wait certutil -ArgumentList $certutilArguments -NoNewWindow
|
||||
$secureString = ConvertTo-SecureString $env:CertificatePassword -AsPlainText -Force
|
||||
Import-PfxCertificate -FilePath .\Greenshot.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $secureString
|
||||
}
|
||||
|
||||
# Sign the specify file
|
||||
Function SignWithCertificate($filename) {
|
||||
Write-Host "Signing $filename"
|
||||
|
@ -325,9 +316,6 @@ FillTemplates
|
|||
echo "Generating MD5"
|
||||
MD5Checksums | Set-Content "$(get-location)\Greenshot\bin\Release\checksum.MD5" -encoding UTF8
|
||||
|
||||
echo "Preparing certificate"
|
||||
PrepareCertificate
|
||||
|
||||
echo "Signing executables"
|
||||
SignBinaryFilesBeforeBuildingInstaller
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue