Fix electron build on arm64
Summary:
Electron-builder puts its results in a different directory, based on the architecture you build on.
While we don't have plans to release an arm64 build internally, we still need to support local builds for testing.
Without this, it fails with a rather confusing error message:
```
Script termnated. Error: spawn zip ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn zip',
path: 'zip',
spawnargs: [ '-qyr9', '../Flipper-mac.zip', 'Flipper.app' ]
```
Reviewed By: lblasa
Differential Revision: D48517426
fbshipit-source-id: 21a133f8fce3aee0737ce5cbccc7a692a613b98e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3ff0c301c8
commit
bf6afe329f
@@ -205,9 +205,13 @@ async function buildDist(buildFolder: string) {
|
||||
if (argv['mac-dmg']) {
|
||||
targetsRaw.push(Platform.MAC.createTarget(['dmg']));
|
||||
}
|
||||
const macPath = path.join(
|
||||
distDir,
|
||||
process.arch === 'arm64' ? 'mac-arm64' : 'mac',
|
||||
);
|
||||
postBuildCallbacks.push(() =>
|
||||
spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], {
|
||||
cwd: path.join(distDir, 'mac'),
|
||||
cwd: macPath,
|
||||
encoding: 'utf-8',
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user