From 7d749e6032ede87e5ef0c432daa3831e9e41c6af Mon Sep 17 00:00:00 2001 From: Robin Mitra Date: Fri, 7 Jun 2019 17:45:52 +0100 Subject: [PATCH] Add travis config and bump version. --- .travis.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 5 +++-- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ff4bd41 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,47 @@ +matrix: + include: + - os: osx + osx_image: xcode9.4 + language: node_js + node_js: "11" + env: + - ELECTRON_CACHE=$HOME/.cache/electron + - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder + + - os: linux + services: docker + language: generic + +cache: + yarn: true + directories: + - node_modules + - $HOME/.cache/electron + - $HOME/.cache/electron-builder + +sudo: false + +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0 + - export PATH=$HOME/.yarn/bin:$PATH + +script: + - | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + docker run --rm \ + --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win" + else + yarn release + fi + +before_cache: + - rm -rf $HOME/.cache/electron-builder/wine + +branches: + except: + - "/^v\\d+\\.\\d+\\.\\d+$/" \ No newline at end of file diff --git a/package.json b/package.json index 31b527c..f3430b4 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "name": "quote-factory", - "version": "0.1.0", + "version": "0.2.0", "description": "A minimal app for getting your dose of famous quotes.", "main": "main.js", "scripts": { "start": "electron .", "pack": "electron-builder --dir", - "dist": "electron-builder" + "dist": "electron-builder", + "release": "build" }, "build": { "appId": "com.robinmitra.gimme-quote",