0a7be91576
* Initial MAS build, working on TestFlight * Migration of old configs to MAS * Ignore fastlane files * Add mac app store build to nightly build * Revert Me - For testing in PR * Don't need to install fastlane * BIG D * Fix patch updater script to allow for no yml * Nevermind, do this instead * Update xcode * Let's try a fake version that works * Revert version and rename for test flight * Use Xcode 13.0.0 * Use CircleCI build number when available * Revert testing changes * Remove notarize for MAS * Change vars to MACOS instead of IOS * Revert electron-builder to v22 * Revert package-lock.json Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// inspired by https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
|
|
require('dotenv').config();
|
|
const {notarize} = require('electron-notarize');
|
|
|
|
const config = require('../electron-builder.json');
|
|
|
|
exports.default = async function notarizing(context) {
|
|
const {electronPlatformName, appOutDir} = context;
|
|
|
|
if (electronPlatformName !== 'darwin' || process.platform !== 'darwin') {
|
|
return;
|
|
}
|
|
|
|
const appName = context.packager.appInfo.productFilename;
|
|
if (typeof process.env.APPLEID === 'undefined') {
|
|
console.log('skipping notarization, remember to setup environment variables for APPLEID and APPLEIDPASS if you want to notarize');
|
|
return;
|
|
}
|
|
await notarize({
|
|
|
|
// should we change it to appBundleId: 'com.mattermost.desktop',
|
|
appBundleId: config.appId,
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
appleId: process.env.APPLEID,
|
|
appleIdPassword: process.env.APPLEIDPASS,
|
|
});
|
|
};
|