when packaging locally we might not have the certificate, so let's opt-in

This commit is contained in:
Brendan Forster 2016-09-27 11:47:48 +10:00
parent 1e5e8cdc24
commit 1397965468

View file

@ -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}`)