-
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(suite-desktop-core): actually use TS for electron-builder scripts
- Loading branch information
Showing
8 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
/* eslint-disable */ | ||
exports.default = async function (configuration) { | ||
import type { CustomWindowsSign } from 'app-builder-lib'; | ||
|
||
const signWindows: CustomWindowsSign = async configuration => { | ||
// Check if IS_CODESIGN_BUILD is set and true | ||
if (!process.env.IS_CODESIGN_BUILD || process.env.IS_CODESIGN_BUILD.toLowerCase() !== 'true') { | ||
console.log('This is DEV build, not signing'); | ||
|
||
return; | ||
} | ||
|
||
// do not include passwords or other sensitive data in the file | ||
// rather create environment variables with sensitive data | ||
const CERTIFICATE_NAME = process.env.WINDOWS_SIGN_CERTIFICATE_NAME; | ||
const TOKEN_PASSWORD = process.env.WINDOWS_SIGN_TOKEN_PASSWORD; | ||
|
||
require('child_process').execSync( | ||
await require('child_process').exec( | ||
`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', | ||
}, | ||
); | ||
}; | ||
|
||
export default signWindows; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../../tsconfig.lib.json", | ||
"compilerOptions": { | ||
"outDir": "lib" | ||
}, | ||
"include": ["./scripts"], | ||
"references": [ | ||
{ | ||
"path": "../eslint" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters