mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-20 05:17:18 +00:00

Change-type: patch Changelog-entry: Allow skipping notarization when building package (dev) Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
24 lines
614 B
JavaScript
24 lines
614 B
JavaScript
'use strict'
|
|
|
|
const { notarize } = require('electron-notarize')
|
|
const { ELECTRON_SKIP_NOTARIZATION } = process.env
|
|
|
|
async function main(context) {
|
|
const { electronPlatformName, appOutDir } = context
|
|
if (electronPlatformName !== 'darwin' || ELECTRON_SKIP_NOTARIZATION === 'true') {
|
|
return
|
|
}
|
|
|
|
const appName = context.packager.appInfo.productFilename
|
|
const appleId = 'accounts+apple@balena.io'
|
|
|
|
await notarize({
|
|
appBundleId: 'io.balena.etcher',
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
appleId,
|
|
appleIdPassword: `@keychain:Application Loader: ${appleId}`
|
|
})
|
|
}
|
|
|
|
exports.default = main
|