mirror of
https://github.com/desktop/desktop
synced 2024-10-31 11:07:25 +00:00
when packaging locally we might not have the certificate, so let's opt-in
This commit is contained in:
parent
1e5e8cdc24
commit
1397965468
1 changed files with 14 additions and 9 deletions
|
@ -46,16 +46,21 @@ function packageWindows () {
|
|||
|
||||
const certificatePath = path.join(__dirname, 'windows-certificate.pfx')
|
||||
|
||||
const options = {
|
||||
appDirectory: distPath,
|
||||
outputDirectory: outputDir,
|
||||
authors: distInfo.getCompanyName(),
|
||||
iconUrl: iconLocation,
|
||||
setupIcon: iconLocation,
|
||||
exe: `${productName}.exe`,
|
||||
}
|
||||
|
||||
if (process.env.APPVEYOR) {
|
||||
options.signWithParams = `/f ${certificatePath} /p ${process.env.WINDOWS_CERT_PASSWORD} /tr http://timestamp.digicert.com /td sha256`
|
||||
}
|
||||
|
||||
electronInstaller
|
||||
.createWindowsInstaller({
|
||||
appDirectory: distPath,
|
||||
outputDirectory: outputDir,
|
||||
authors: distInfo.getCompanyName(),
|
||||
iconUrl: iconLocation,
|
||||
setupIcon: iconLocation,
|
||||
exe: `${productName}.exe`,
|
||||
signWithParams: `/f ${certificatePath} /p ${process.env.WINDOWS_CERT_PASSWORD} /tr http://timestamp.digicert.com /td sha256`
|
||||
})
|
||||
.createWindowsInstaller(options)
|
||||
.then(() => {
|
||||
console.log(`Installers created in ${outputDir}`)
|
||||
cp.execSync(`powershell ${cleanupCertificatePath}`)
|
||||
|
|
Loading…
Reference in a new issue