714980c8c6
* [MM-19569] add notarization to release also added signing verification on release added electron-notarize to dev deps * [MM-19569] fix semicolon * [MM-19569] check that we are running on osx to notarize
26 lines
851 B
JavaScript
26 lines
851 B
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;
|
|
|
|
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,
|
|
});
|
|
}; |