thedesk/app/build/notarize.js

19 lines
699 B
JavaScript
Raw Normal View History

require('dotenv').config()
2022-12-08 01:23:50 +11:00
const { notarize } = require('@electron/notarize')
const useNotarize = true
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context
if (electronPlatformName !== 'darwin' || !useNotarize) return
const appName = context.packager.appInfo.productFilename
console.log(`start notarize: ${appOutDir}/${appName}.app`)
try {
return await notarize({
appBundleId: 'top.thedesk',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
})
} catch (e) {
throw console.log(e)
}
2022-12-08 01:23:50 +11:00
}