-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
69 lines (60 loc) · 1.92 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Travis CI configuration file to build BrainVerse application for
# macOS, Linux, and Windows
# Based on https://github.com/develar/onshape-desktop-shell/blob/51c8894e2857412dcf2ff4d68f8578bd4653b7a3/.travis.yml
env:
global:
- TRAVIS_SECURE_ENV_VARS=true
- DEBUG=electron-builder
matrix:
include:
- os: osx
osx_image: xcode9.0
language: node_js
node_js: "8"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
sudo: required
services: docker
language: generic
cache:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
before_script:
# Replace clientId and clientSecret values in app-config.js with environment
# variable values.
- cd eapp/config/
- sed -i -e "s/exports.clientId = ''/exports.clientId = \"$clientId\"/g" app-config.js
- sed -i -e "s/exports.clientSecret = ''/exports.clientSecret = \"$clientSecret\"/g" app-config.js
- cd ../../
script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
-e TRAVIS=$TRAVIS \
-e TRAVIS_SECURE_ENV_VARS=$TRAVIS_SECURE_ENV_VARS \
-e clientId=${clientId} \
-e clientSecret=${clientSecret} \
-e GH_TOKEN=${GH_TOKEN} \
-v $(pwd):/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder@sha256:be4be15a1acffa57ef99b9e3ded821c79ad60c294a325da14ca31a526d1d0d6d \
bash -c "
yarn --link-duplicates --pure-lockfile \
&& yarn dist --linux --win
"
else
# Code signing for macOS is not available in Docker, so we build on macOS.
yarn dist --mac
fi
#ls dist/
before_cache:
- rm -rf $HOME/.cache/electron-builder/latest
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"