language: node_js
node_js: "12"

cache:
  directories:
    - node_modules
    - $HOME/.cache/electron
    - $HOME/.cache/electron-builder

install:
  - npm install

jobs:
  include:
    -
      os: osx
      osx_image: xcode10.2
      env:
        - ELECTRON_CACHE=$HOME/.cache/electron
        - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
        - MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
      name: Mac
      script:
        - npm run lint

    - 
      os: linux
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
            - gcc-5
      env: CC=gcc-5 CXX=g++-5
      name: Linux
      script:
        - npm run lint
        - "[[ $TRAVIS_BRANCH == master ]] && npm run publish:linux"

notifications:
  email: false
language: node_js
node_js: "12"

cache:
  directories:
    - node_modules
    - $HOME/.cache/electron
    - $HOME/.cache/electron-builder

install:
  - npm install

jobs:
  include:
    -
      os: osx
      osx_image: xcode10.2
      env:
        - ELECTRON_CACHE=$HOME/.cache/electron
        - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
        - MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
      name: Mac
      script:
        - npm run lint

    - 
      os: linux
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
            - gcc-5
      env: CC=gcc-5 CXX=g++-5
      name: Linux
      script:
        - npm run lint
        - "[[ $TRAVIS_BRANCH == master ]] && npm run publish:linux || 0"

notifications:
  email: false
Fix case where branch is not master
Fix case where branch is not master
