Add automated checks for desktop app runtime #233
- 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.
This commit is contained in:
20
scripts/check-desktop-runtime-errors/cli-args.js
Normal file
20
scripts/check-desktop-runtime-errors/cli-args.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user