1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00
Files
browser/apps/desktop/desktop_native/napi/scripts/build.js
neuronull 22e9c6a72f Re-apply desktop native debug log level debug builds and fix build workflow (#17908)
* Reapply "Desktop Native compile debug builds with debug log level (#17357)" (#17815)

This reverts commit 5386b58f23.

* Use release mode if workflow called from upstream

* fix bug in build script

* revert napi build command to not use --release

* forward caller's args to napi

* js things

* shell thangs

* use platform agnostic expansion

* Revert "use platform agnostic expansion"

This reverts commit 5ee629f822.

* powershell expansion
2025-12-11 12:44:51 -07:00

23 lines
550 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const { execSync } = require('child_process');
const args = process.argv.slice(2);
const isRelease = args.includes('--release');
const argsString = args.join(' ');
if (isRelease) {
console.log('Building release mode.');
execSync(`napi build --platform --no-js ${argsString}`, { stdio: 'inherit'});
} else {
console.log('Building debug mode.');
execSync(`napi build --platform --no-js ${argsString}`, {
stdio: 'inherit',
env: { ...process.env, RUST_LOG: 'debug' }
});
}