[MM-19569] add notarization to osx app (#1086)
* [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
This commit is contained in:

committed by
Elias Nahum

parent
b731ffcd75
commit
714980c8c6
26
scripts/notarize.js
Normal file
26
scripts/notarize.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// 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,
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user