Compare commits

...

1 Commits

Author SHA1 Message Date
Eugene Pankov
44b4f5ccf8 wip 2018-08-18 21:47:11 +02:00
3 changed files with 40 additions and 15 deletions

View File

@@ -1,27 +1,35 @@
matrix:
include:
- os: linux
env: BUILD_FOR=linux
- os: osx
env: BUILD_FOR=macos
language: node_js language: node_js
node_js: 7 node_js: 7
services:
- docker
cache: cache:
directories: directories:
- node_modules - node_modules
- app/node_modules - app/node_modules
before_install: stages:
- yarn install - build
- scripts/install-deps.js - name: deploy
if: branch = master
script: jobs:
- scripts/build-native.js include:
- yarn run build - stage: build
- scripts/prepackage-plugins.js os: linux
- scripts/build-$BUILD_FOR.js env: BUILD_FOR=linux
script: ./travis.sh
- stage: build
os: osx
env: BUILD_FOR=macos
script: ./travis.sh
- stage: deploy
os: linux
env: BUILD_FOR=linux STAGE=deploy
script: ./travis.sh
dist: trusty dist: trusty
sudo: false sudo: false

View File

@@ -93,6 +93,9 @@
"github" "github"
] ]
}, },
"snap": {
"confinement": "classic"
},
"deb": { "deb": {
"depends": [ "depends": [
"screen", "screen",

14
travis.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -ev
yarn install
scripts/install-deps.js
scripts/build-native.js
yarn run build
scripts/prepackage-plugins.js
scripts/build-$BUILD_FOR.js
if [ "${STAGE}" = "deploy" ]; then
docker run -v $(pwd):$(pwd) -t snapcore:snapcraft sh -c "apt update -qq && cd $(pwd) && snapcraft && snapcraft push dist/*.snap --release edge"
fi