Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
dfunckt committed Nov 7, 2023
1 parent 43b76f2 commit 0bf3b86
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ runs:
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
set -ea
runner_os="$(echo "${RUNNER_OS}" | tr '[:upper:]' '[:lower:]')"
npm ci
npm run package
npm run test-${runner_os}
env:
# https://www.electronjs.org/docs/latest/api/environment-variables
ELECTRON_NO_ATTACH_CONSOLE: true
ELECTRON_NO_ATTACH_CONSOLE: 'true'
ELECTRON_SKIP_NOTARIZATION: 'true'

- name: Compress custom source
if: runner.os != 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ every byte of data was written correctly and much more.`;
let osxSigningConfig: any = {};
let winSigningConfig: any = {};

if (process.env.NODE_ENV !== 'development') {
if (process.env.NODE_ENV !== 'development' || process.env.ELECTRON_SKIP_NOTARIZATION !== 'true') {
osxSigningConfig.osxSign = {
optionsForFile: () => ({
entitlements: './entitlements.mac.plist',
Expand Down
6 changes: 3 additions & 3 deletions lib/gui/app/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import * as webapi from '../webapi';

declare global {
interface Window {
etcher: typeof webapi;
}
interface Window {
etcher: typeof webapi;
}
}

window['etcher'] = webapi;
1 change: 0 additions & 1 deletion lib/gui/etcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ electron.app.on('before-quit', () => {
process.exit(EXIT_CODES.SUCCESS);
});


// this is replaced at build-time with the path to etcher-util
declare const ETCHER_UTIL_BIN_PATH: string;

Expand Down
2 changes: 1 addition & 1 deletion lib/gui/webapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import { ipcRenderer } from 'electron';
// binary. We should instead export a function that asks the main process to launch
// the binary itself.
export async function getEtcherUtilPath(): Promise<string> {
return await ipcRenderer.invoke('get-util-path');
return await ipcRenderer.invoke('get-util-path');
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"lint": "npm run lint-ts && npm run lint-css",
"test-gui": "electron-mocha --recursive --reporter spec --window-config tests/gui/window-config.json --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox --renderer tests/gui/**/*.ts",
"test-shared": "electron-mocha --recursive --reporter spec --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox tests/shared/**/*.ts",
"test-windows": "npm run lint && npm run test-gui && npm run test-shared",
"test-macos": "npm run lint && npm run test-gui && npm run test-shared",
"test-linux": "npm run lint && xvfb-run --auto-servernum npm run test-gui && xvfb-run --auto-servernum npm run test-shared",
"test-windows": "npm run lint && npm run test-gui && npm run test-shared",
"test": "echo npm run test-{linux,windows,macos}",
"package": "electron-forge package",
"start": "electron-forge start",
Expand Down

0 comments on commit 0bf3b86

Please sign in to comment.