mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-18 10:06:33 +00:00

* IDE updater assorted bugfix - add linux AppImage target - fix hardcoded if condition that causes to always show the update dialog - fix redundant test build version - recalculate sha512 after notarization on macOS * boost notarization speed * recalculate artifacts hash
33 lines
904 B
JavaScript
33 lines
904 B
JavaScript
const isCI = require('is-ci');
|
|
const { notarize } = require('electron-notarize');
|
|
|
|
exports.default = async function notarizing(context) {
|
|
if (!isCI) {
|
|
console.log('Skipping notarization: not on CI.');
|
|
return;
|
|
}
|
|
if (process.env.IS_FORK === 'true') {
|
|
console.log('Skipping the app notarization: building from a fork.');
|
|
return;
|
|
}
|
|
const { electronPlatformName, appOutDir } = context;
|
|
if (electronPlatformName !== 'darwin') {
|
|
return;
|
|
}
|
|
|
|
const appName = context.packager.appInfo.productFilename;
|
|
const appBundleId = context.packager.config.appId;
|
|
console.log(
|
|
`>>> Notarizing ${appBundleId} at ${appOutDir}/${appName}.app...`
|
|
);
|
|
|
|
await notarize({
|
|
appBundleId,
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
appleId: process.env.AC_USERNAME,
|
|
appleIdPassword: process.env.AC_PASSWORD,
|
|
teamId: process.env.AC_TEAM_ID,
|
|
tool: 'notarytool',
|
|
});
|
|
};
|