Skip to content
Permalink
Browse files

Use electron-builder on Travis CI

  • Loading branch information...
christianbundy committed Apr 16, 2019
1 parent 75f6de3 commit cf1880682c92a913fcea071273acd4f87b463140
@@ -0,0 +1 @@
node_modules
@@ -1,4 +1,5 @@
node_modules
dist

# Mac OS metadata file
.DS_Store
@@ -1,13 +1,64 @@
language: node_js
# We can build the Linux and Windows installers on Linux, but we need to use
# macOS so that we can build the macOS installer.
matrix:
include:
- os: osx
osx_image: xcode9.4
language: node_js
node_js: "10"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

- os: linux
services: docker
language: generic

before_install:
- sudo apt-get -qq update
- sudo apt-get install -y g++ m4 libtool automake libgconf-2-4 # build tools
- sudo apt-get install -y libxext-dev libxtst-dev libxkbfile-dev # spellchecker headers
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

node_js:
- node
- lts/*
# This module is specific to Linux, and since Travis runs `npm ci` we need to
# remove it before the installation occurs on macOS.
before_install:
- |
if [ "$TRAVIS_OS_NAME" != "linux" ]; then
npm rm --save mouse-forward-back
fi
script:
- pwd # run no-op to prevent failure from no tests
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run \
-i \
-t \
--rm \
--env-file <(env | grep -iE '(DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_)\\s*=') \
-v "$PWD":/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c 'env \
&& apt-get update \
&& apt-get install -y --allow-unauthenticated \
automake \
libgconf-2-4 \
libtool \
libxext-dev \
libxkbfile-dev \
libxtst-dev \
&& npm install \
&& npm test \
&& npm run dist -- --linux --win'
else
npm run dist -- --mac
fi
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
BIN +13.2 KB build/background.png
Binary file not shown.
Binary file not shown.
BIN +259 KB build/dmg-icon.icns
Binary file not shown.
BIN +213 KB build/icon.icns
Binary file not shown.
BIN +361 KB build/icon.ico
Binary file not shown.

0 comments on commit cf18806

Please sign in to comment.
You can’t perform that action at this time.