From b206483c7cf37ef9865bc242b4053f6a5cc7cdec Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 15 Feb 2021 15:02:18 +0100 Subject: [PATCH] Update scripts to build universal mac dmgs on the ci Change-type: patch --- beforeBuild.js | 21 +++++++++++---------- scripts/resin | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/beforeBuild.js b/beforeBuild.js index 3d716b32..684b64b3 100644 --- a/beforeBuild.js +++ b/beforeBuild.js @@ -6,21 +6,22 @@ const process = require('process'); // Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages exports.default = function(context) { - if (['windows', 'mac'].includes(context.platform.name)) { - cp.execFileSync( - 'npx', - ['electron-rebuild', '--types', 'dev', '--arch', context.arch], - ); + if (['windows', 'mac'].includes(context.platform.name)) { + const run = context.platform.name === 'windows' ? 'sh' : 'node'; + cp.execFileSync( + run, + ['node_modules/.bin/electron-rebuild', '--types', 'dev', '--arch', context.arch], + ); rimraf.sync('generated'); - cp.execFileSync( - 'npx', - ['webpack'], + cp.execFileSync( + run, + ['node_modules/.bin/webpack'], { env: { ...process.env, npm_config_target_arch: context.arch, }, }, - ); - } + ); + } } diff --git a/scripts/resin b/scripts/resin index 214ddc7e..d1b05ad3 160000 --- a/scripts/resin +++ b/scripts/resin @@ -1 +1 @@ -Subproject commit 214ddc7e3d35f7c37424c5a7696e33b10e424f43 +Subproject commit d1b05ad312e65ea82b1c16b31f5af3c0b5fa2777