mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
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 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
This commit is contained in:
22
apps/desktop/desktop_native/napi/scripts/build.js
Normal file
22
apps/desktop/desktop_native/napi/scripts/build.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/* 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' }
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user