-
-
Notifications
You must be signed in to change notification settings - Fork 359
chore(suite-desktop): rewrite builder hooks to ESM #18680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,6 @@ const notarizeAfterSignHook: Hooks['afterSign'] = context => { | |
| console.log(`notarizing ${appPath} ...`); | ||
|
|
||
| return notarize({ | ||
| tool: 'notarytool', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| appPath, | ||
| appleId: process.env.APPLEID, | ||
| appleIdPassword: process.env.APPLEIDPASS, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import type { CustomWindowsSign } from 'app-builder-lib'; | ||
| import { execSync } from 'node:child_process'; | ||
|
|
||
| // electron-builder TS requires the function to return Promise, but jsign MUST be called with execSync! | ||
| // eslint-disable-next-line require-await | ||
|
|
@@ -15,7 +16,7 @@ const signWindows: CustomWindowsSign = async configuration => { | |
| const CERTIFICATE_NAME = process.env.WINDOWS_SIGN_CERTIFICATE_NAME; | ||
| const TOKEN_PASSWORD = process.env.WINDOWS_SIGN_TOKEN_PASSWORD; | ||
|
|
||
| require('child_process').execSync( | ||
| execSync( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because I broke app update on Windows the last time I touched this, I tested now that the sha sums are correct with codesign windows build (locally self-signed): Linux build just for completeness: |
||
| `java -jar ../suite-desktop-core/scripts/jsign-6.0.jar --keystore ../suite-desktop-core/scripts/hardwareToken.cfg --storepass '${TOKEN_PASSWORD}' --storetype PKCS11 --tsaurl http://timestamp.digicert.com --alias "${CERTIFICATE_NAME}" "${configuration.path}"`, | ||
| { | ||
| stdio: 'inherit', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| { | ||
| "extends": "../../tsconfig.lib.json", | ||
| "compilerOptions": { | ||
| "module": "ESNext", | ||
| "declaration": false, | ||
| "sourceMap": false, | ||
| "declarationMap": false, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not emit |
||
| "outDir": "lib" | ||
| }, | ||
| "include": ["./scripts"], | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda hacky; what's going on here?
We have to indicate ESM to electron-builder somehow, it can't tell automatically.
Two ways to do that:
"type": "module"insuite-desktop/package.jsonmjsextension, but tsconfig doesn't offer custom extensionsuite-desktopis entirely ESM