Update scripts to build universal mac dmgs on the ci

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2021-02-15 15:02:18 +01:00
parent c3eb8c7b56
commit b206483c7c
2 changed files with 12 additions and 11 deletions

View File

@ -6,21 +6,22 @@ const process = require('process');
// Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages // Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages
exports.default = function(context) { exports.default = function(context) {
if (['windows', 'mac'].includes(context.platform.name)) { if (['windows', 'mac'].includes(context.platform.name)) {
cp.execFileSync( const run = context.platform.name === 'windows' ? 'sh' : 'node';
'npx', cp.execFileSync(
['electron-rebuild', '--types', 'dev', '--arch', context.arch], run,
); ['node_modules/.bin/electron-rebuild', '--types', 'dev', '--arch', context.arch],
);
rimraf.sync('generated'); rimraf.sync('generated');
cp.execFileSync( cp.execFileSync(
'npx', run,
['webpack'], ['node_modules/.bin/webpack'],
{ {
env: { env: {
...process.env, ...process.env,
npm_config_target_arch: context.arch, npm_config_target_arch: context.arch,
}, },
}, },
); );
} }
} }

@ -1 +1 @@
Subproject commit 214ddc7e3d35f7c37424c5a7696e33b10e424f43 Subproject commit d1b05ad312e65ea82b1c16b31f5af3c0b5fa2777