1
0
mirror of https://github.com/bitwarden/browser synced 2025-01-17 04:39:46 +01:00

sign ssafari app extension after sign

This commit is contained in:
Kyle Spearrin 2019-09-30 09:32:33 -04:00
parent 2c6229a936
commit fa0fc9d8c7

View File

@ -1,10 +1,11 @@
require('dotenv').config(); require('dotenv').config();
const { notarize } = require('electron-notarize'); const { notarize } = require('electron-notarize');
const child = require('child_process');
exports.default = run; exports.default = run;
async function run(context) { async function run(context) {
console.log('### After sign'); console.log('## After sign');
// console.log(context); // console.log(context);
const appleId = process.env.APPLEID; const appleId = process.env.APPLEID;
@ -13,6 +14,11 @@ async function run(context) {
const macBuild = context.electronPlatformName === 'darwin'; const macBuild = context.electronPlatformName === 'darwin';
if (macBuild) { if (macBuild) {
console.log('### Sign Safari App Extension');
const proc = child.spawn('npm', ['run', 'signMac']);
stdOutProc(proc);
await new Promise((resolve) => proc.on('close', resolve));
console.log('### Notarizing ' + appPath); console.log('### Notarizing ' + appPath);
return await notarize({ return await notarize({
appBundleId: 'com.bitwarden.desktop', appBundleId: 'com.bitwarden.desktop',
@ -22,3 +28,8 @@ async function run(context) {
}); });
} }
} }
function stdOutProc(proc) {
proc.stdout.on('data', (data) => console.log(data.toString()));
proc.stderr.on('data', (data) => console.error(data.toString()));
}