mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -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
|
@ -44,6 +44,9 @@ environment:
|
|||
before_build:
|
||||
- nuget restore
|
||||
- ps: .\prebuild.ps1
|
||||
- ps: [System.Convert]::FromBase64String($env:CertificatePassword) | set-content "greenshot.pfx" -encoding byte
|
||||
- ps: $psw = ConvertTo-SecureString $env:my_secure_var -AsPlainText
|
||||
- ps: Import-PfxCertificate -FilePath Greenshot.pfx -CertStoreLocation cert:\CurrentUser\My -Password $psw
|
||||
build:
|
||||
project: greenshot.sln
|
||||
verbosity: normal
|
||||
|
|
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