diff --git a/scripts/after-sign.js b/scripts/after-sign.js index 77fe6561c5..782b9c17dd 100644 --- a/scripts/after-sign.js +++ b/scripts/after-sign.js @@ -1,10 +1,11 @@ require('dotenv').config(); const { notarize } = require('electron-notarize'); +const child = require('child_process'); exports.default = run; async function run(context) { - console.log('### After sign'); + console.log('## After sign'); // console.log(context); const appleId = process.env.APPLEID; @@ -13,6 +14,11 @@ async function run(context) { const macBuild = context.electronPlatformName === 'darwin'; 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); return await notarize({ 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())); +}