1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-23 03:22:50 +02:00
bitwarden-browser/apps/desktop/desktop_native/napi/build.js
Daniel García 33c985e00b
[PM-8789] Move desktop_native into subcrate (#9682)
* Move desktop_native into subcrate

* Add publish = false to crates
2024-07-01 15:19:29 +02:00

23 lines
607 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const child_process = require("child_process");
const process = require("process");
let targets = [];
switch (process.platform) {
case "win32":
targets = ["i686-pc-windows-msvc", "x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc"];
break;
case "darwin":
targets = ["x86_64-apple-darwin", "aarch64-apple-darwin"];
break;
default:
targets = ['x86_64-unknown-linux-musl'];
break;
}
targets.forEach(target => {
child_process.execSync(`npm run build -- --target ${target}`, {stdio: 'inherit'});
});