mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
* Reapply "Desktop Native compile debug builds with debug log level (#17357)" (#17815) This reverts commit5386b58f23. * 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 commit5ee629f822. * powershell expansion
23 lines
550 B
JavaScript
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' }
|
|
});
|
|
}
|