- Add automation script for building, packaging, installing, executing and verifying Electron distrubtions across macOS, Ubuntu and Windows. - Add GitHub workflow to run the script to test distributions using the script. - Update README with new workflow status badge. - Add application initialization log to desktop applications to be able to test against crashes before application initialization.
21 lines
483 B
JavaScript
21 lines
483 B
JavaScript
import { log } from './utils/log.js';
|
|
|
|
const PROCESS_ARGUMENTS = process.argv.slice(2);
|
|
|
|
export const COMMAND_LINE_FLAGS = Object.freeze({
|
|
FORCE_REBUILD: '--build',
|
|
TAKE_SCREENSHOT: '--screenshot',
|
|
});
|
|
|
|
export function logCurrentArgs() {
|
|
if (!PROCESS_ARGUMENTS.length) {
|
|
log('No additional arguments provided.');
|
|
return;
|
|
}
|
|
log(`Arguments: ${PROCESS_ARGUMENTS.join(', ')}`);
|
|
}
|
|
|
|
export function hasCommandLineFlag(flag) {
|
|
return PROCESS_ARGUMENTS.includes(flag);
|
|
}
|