mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-09-10 06:15:17 +00:00
* Improve hak & build ia32 again by default * Test both x86_64 and i686 in CI * Improve macOS job name * Try other things * Iterating this is no fun * Attempt again * pwsh is the default, use cmd * Update the incantation for 2022 * Avoid warning multiple times * Consolidate build tool setup * Move default targets to electron-builder and fix warnings
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
const { notarize } = require('electron-notarize');
|
|
|
|
let warned = false;
|
|
exports.default = async function(context) {
|
|
const { electronPlatformName, appOutDir } = context;
|
|
const appId = context.packager.info.appInfo.id;
|
|
|
|
if (electronPlatformName === 'darwin') {
|
|
const appName = context.packager.appInfo.productFilename;
|
|
// We get the password from keychain. The keychain stores
|
|
// user IDs too, but apparently altool can't get the user ID
|
|
// from the keychain, so we need to get it from the environment.
|
|
const userId = process.env.NOTARIZE_APPLE_ID;
|
|
if (userId === undefined) {
|
|
if (!warned) {
|
|
console.log("*************************************");
|
|
console.log("* NOTARIZE_APPLE_ID is not set. *");
|
|
console.log("* This build will NOT be notarised. *");
|
|
console.log("*************************************");
|
|
warned = true;
|
|
}
|
|
return;
|
|
}
|
|
|
|
console.log("Notarising macOS app. This may be some time.");
|
|
return await notarize({
|
|
appBundleId: appId,
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
appleId: userId,
|
|
appleIdPassword: '@keychain:NOTARIZE_CREDS',
|
|
});
|
|
}
|
|
};
|