File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,18 @@ addons:
21
21
before_script :
22
22
- >
23
23
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
24
+ # On OSX, pull the cert from a base64 env var
24
25
export CERTIFICATE_P12=certificates/Certificate.p12;
25
26
echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12;
27
+ # Create a new OSX keychain (we can't access the travis default)
26
28
export KEYCHAIN=httptoolkit-build.keychain;
27
- export KEYCHAIN_PASSWORD=mysupersecretpassword
29
+ export KEYCHAIN_PASSWORD=mynotverysecretpassword
28
30
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN;
29
31
security default-keychain -s $KEYCHAIN;
30
32
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN;
33
+ # Try and make code signing work reliably, see
34
+ # https://docs.travis-ci.com/user/common-build-problems/#mac-os-x-mavericks-109-code-signing-errors
35
+ # https://docs.travis-ci.com/user/common-build-problems/#mac-macos-sierra-1012-code-signing-errors
31
36
security set-keychain-settings -t 3600 -u $KEYCHAIN
32
37
security import $CERTIFICATE_P12 -k $KEYCHAIN -P $CERTIFICATE_OSX_PASSWORD -T /usr/bin/codesign;
33
38
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ platform:
3
3
4
4
environment :
5
5
nodejs_version : " 10"
6
+ # Github token, used to pull the latest httptoolkit-server release
7
+ GITHUB_TOKEN : PASSWORD
8
+ # Password to decrypt the cert pfx (set in CI config)
9
+ CERTIFICATE_FILE_KEY : PASSWORD
10
+ # Password to use the code signing cert (set in CI config)
11
+ ELECTRON_FORGE_ELECTRON_WINSTALLER_CONFIG_CERTIFICATE_PASSWORD : PASSWORD
6
12
7
13
cache :
8
14
- ' %APPDATA%\npm-cache'
@@ -20,6 +26,7 @@ branches:
20
26
21
27
install :
22
28
- ps : iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
29
+ # Decrypt the raw cert - arguably unnecessary (cert has its own key), but nice to have since it's committed & public
23
30
- cmd : appveyor-tools\secure-file -decrypt certificates/encrypted-win-cert.pfx.enc -secret %CERTIFICATE_FILE_KEY%
24
31
- ps : Install-Product node $env:nodejs_version $env:platform
25
32
- set PATH=%APPDATA%\npm;%PATH%
You can’t perform that action at this time.
0 commit comments