spec: add tests for the autoUpdater on macOS that actually test if it works (#17442)
* spec: add tests for the autoUpdater on macOS that actually test if it works * spec: add express as dep * spec: add logic to auto-trust self-signed certificate and not run autoupdate specs on MAS * build: fix the step name for importing the codesign cert * chore: update updater spec PR as per feedback * fix: s/atomBinding/electronBinding * build: use spawn instead of exec
This commit is contained in:
parent
5045b0a962
commit
b8dbe4bc15
21 changed files with 923 additions and 48 deletions
25
script/codesign/import-testing-cert-ci.sh
Executable file
25
script/codesign/import-testing-cert-ci.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
KEY_CHAIN=mac-build.keychain
|
||||
KEYCHAIN_PASSWORD=unsafe_keychain_pass
|
||||
security create-keychain -p $KEYCHAIN_PASSWORD $KEY_CHAIN
|
||||
# Make the keychain the default so identities are found
|
||||
security default-keychain -s $KEY_CHAIN
|
||||
# Unlock the keychain
|
||||
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEY_CHAIN
|
||||
# Set keychain locking timeout to 3600 seconds
|
||||
security set-keychain-settings -t 3600 -u $KEY_CHAIN
|
||||
|
||||
# Add certificates to keychain and allow codesign to access them
|
||||
security import "$(dirname $0)"/signing.cer -k $KEY_CHAIN -A /usr/bin/codesign
|
||||
security import "$(dirname $0)"/signing.pem -k $KEY_CHAIN -A /usr/bin/codesign
|
||||
security import "$(dirname $0)"/signing.p12 -k $KEY_CHAIN -P $SPEC_KEY_PASSWORD -A /usr/bin/codesign
|
||||
|
||||
echo "Add keychain to keychain-list"
|
||||
security list-keychains -s mac-build.keychain
|
||||
|
||||
echo "Setting key partition list"
|
||||
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD $KEY_CHAIN
|
||||
|
||||
echo "Trusting self-signed certificate"
|
||||
sudo security trust-settings-import -d "$(dirname $0)"/trust-settings.plist
|
Loading…
Add table
Add a link
Reference in a new issue