-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from arduino/development
Development to Main
- Loading branch information
Showing
10 changed files
with
201 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const childProcess = require('child_process'); | ||
|
||
exports.default = async function (configuration) { | ||
if (!process.env.GITHUB_ACTIONS) { | ||
return; | ||
} | ||
|
||
const SIGNTOOL_PATH = process.env.SIGNTOOL_PATH; | ||
const INSTALLER_CERT_WINDOWS_CER = process.env.INSTALLER_CERT_WINDOWS_CER; | ||
const CERT_PASSWORD = process.env.WIN_CERT_PASSWORD; | ||
const CONTAINER_NAME = process.env.WIN_CERT_CONTAINER_NAME; | ||
const filePath = configuration.path; | ||
|
||
if ( | ||
SIGNTOOL_PATH && | ||
INSTALLER_CERT_WINDOWS_CER && | ||
CERT_PASSWORD && | ||
CONTAINER_NAME | ||
) { | ||
childProcess.execSync( | ||
`"${SIGNTOOL_PATH}" sign -d "Arduino Lab for MicroPython" -f "${INSTALLER_CERT_WINDOWS_CER}" -csp "eToken Base Cryptographic Provider" -k "[{{${CERT_PASSWORD}}}]=${CONTAINER_NAME}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "${filePath}"`, | ||
{ stdio: 'inherit' } | ||
); | ||
} else { | ||
console.warn( | ||
`Custom windows signing was no performed one of the following variables was not provided: SIGNTOOL_PATH (${SIGNTOOL_PATH}), INSTALLER_CERT_WINDOWS_CERT (${INSTALLER_CERT_WINDOWS_CER}), CERT_PASSWORD (${CERT_PASSWORD}), CONTAINER_NAME (${CONTAINER_NAME})` | ||
); | ||
process.exit(1); | ||
} | ||
}; |
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
Oops, something went wrong.