electron/script/codesign/import-testing-cert-ci.sh
Jeremy Apthorp 805a55099b test: tsify more web contents specs (#19969)
* test: tsify more WebContents specs

* getFocusedWebContents

* setDevToolsWebContents, isFocused, isCurrentlyAudible

* getWebPreferences, openDevTools

* before-input-event

* zoom-changed

* sendInputEvent

* insertCSS

* startDrag

* focus, getOSProcessId

* zoom api

* more closeAllWindows

* fix detached dev tools test

* fix zoom-changed test

* compare the correct kind of id 🤦‍♂️

* 'fix' openDevTools test to wait for multiple focus events

* fix tests? 🤞

* use request instead of blur to detect openExternal success

* try not timing out the keychain for testing

* use blur event on mac, sigh

* oh, right, still gotta open an actual url
2019-08-29 19:45:41 -05:00

23 lines
956 B
Bash
Executable file

#!/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
# 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 $KEY_CHAIN
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