2021-06-10 12:56:51 +03:00
|
|
|
/// This script will trigger the notarisation process for macOS and trigger our pre-processing
|
|
|
|
/// and signing of the engine.
|
2021-11-05 14:51:43 +03:00
|
|
|
require('dotenv').config()
|
|
|
|
const { notarize } = require('electron-notarize')
|
2021-06-10 12:56:51 +03:00
|
|
|
|
|
|
|
exports.default = async function notarizing(context) {
|
2021-11-05 14:51:43 +03:00
|
|
|
const { electronPlatformName, appOutDir } = context
|
2021-06-10 12:56:51 +03:00
|
|
|
if (electronPlatformName !== 'darwin') {
|
2021-11-05 14:51:43 +03:00
|
|
|
return
|
2021-06-10 12:56:51 +03:00
|
|
|
}
|
|
|
|
// We need to manually re-sign our build artifacts before notarisation.
|
|
|
|
// See the script for more information.
|
2021-11-05 14:51:43 +03:00
|
|
|
console.log(' • Performing additional signing of dependencies.')
|
2022-01-10 12:18:34 +03:00
|
|
|
await require('./signArchivesMacOs').default()
|
2021-06-10 12:56:51 +03:00
|
|
|
|
|
|
|
// Notarize the application.
|
2021-11-05 14:51:43 +03:00
|
|
|
const appName = context.packager.appInfo.productFilename
|
|
|
|
console.log(' • Notarizing.')
|
2021-06-10 12:56:51 +03:00
|
|
|
return await notarize({
|
|
|
|
appBundleId: 'com.enso.ide',
|
|
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
|
|
appleId: process.env.APPLEID,
|
|
|
|
appleIdPassword: process.env.APPLEIDPASS,
|
2021-11-05 14:51:43 +03:00
|
|
|
})
|
|
|
|
}
|