Files
battery/app/build_hooks/afterSign.js
2022-09-21 11:58:45 +02:00

24 lines
814 B
JavaScript

/* ///////////////////////////////
// Notarization
// See https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
// /////////////////////////////*/
require('dotenv').config()
const { notarize } = require('electron-notarize')
const log = ( ...messages ) => console.log( ...messages )
exports.default = async function notarizing(context) {
log( '\n\n🪝 afterSign hook triggered: ' )
const { appOutDir } = context
const { APPLEID, APPLEIDPASS, TEAMID } = process.env
const appName = context.packager.appInfo.productFilename
return await notarize( {
appBundleId: 'co.palokaj.battery',
tool: "notarytool",
appPath: `${appOutDir}/${appName}.app`,
appleId: APPLEID,
appleIdPassword: APPLEIDPASS,
teamId: TEAMID
} )
}