forked from bitfocus/companion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (59 loc) · 1.77 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
matrix:
include:
- os: osx
osx_image: xcode8.3
language: node_js
node_js: "8"
- os: linux
services: docker
language: generic
branches:
only:
- master
env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
notifications:
slack: bitfocusio:Kf9NGYG60SzXkZ2tJO8wIknp
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds
- $HOME/.cache/snapcraft
before_install:
- curl -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-v* $HOME/.yarn
- export PATH="$HOME/.yarn/bin:$PATH"
- git fetch --unshallow
- git submodule sync
- git submodule init
- git submodule update
install:
- ./tools/build_writefile.sh
script:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run --rm \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
-v ~/.cache/snapcraft:/root/.cache/snapcraft \
haakonn/electron-wine:v1 \
/bin/bash -c "apt-get update && apt-get install -y git ; tools/yarn.sh ; npm run lindist";
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
tools/yarn.sh
npm run dist
fi
- ./tools/build_rename_git.sh
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
after_success:
- "if [[ \"$TRAVIS_OS_NAME\" == \"osx\" ]]; then curl -T electron-output/*.zip -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_IP/deploy/electron-output/ ; fi"
- "if [[ \"$TRAVIS_OS_NAME\" == \"linux\" ]]; then curl -T electron-linux-output/*.tar.gz -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_IP/deploy/electron-output/ ; fi"