Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (60 sloc) 1.92 KB
# 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+$/"
You can’t perform that action at this time.