-
Notifications
You must be signed in to change notification settings - Fork 638
/
.travis.yml
74 lines (74 loc) · 2.12 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
72
73
74
os:
- linux
- osx
# - windows
language: node_js
node_js:
- node
- "12"
- "10"
branches:
only:
- master
- /^v\d+\.\d+\.\d+$/
env:
jobs:
- GIT_VERSION=edge
- GIT_VERSION=default
jobs:
exclude:
- node_js: "12"
env: GIT_VERSION=edge
- node_js: "10"
env: GIT_VERSION=edge
- os: windows
env: GIT_VERSION=edge
addons:
apt:
packages:
- xvfb
- libgconf-2-4
- wine
homebrew:
update: true
casks:
- xquartz
- wine-stable
before_install:
# linux
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then export DISPLAY=':99.0'; fi
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & fi
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then wine --version; fi
- if [[ $TRAVIS_OS_NAME = "linux" && $GIT_VERSION = "edge" ]]; then sudo add-apt-repository ppa:git-core/ppa -y && sudo apt-get update -q && sudo apt-get install -y git; fi
# osx
- if [[ $TRAVIS_OS_NAME = "osx" ]]; then export WINEDLLOVERRIDES='mscoree,mshtml='; fi
- if [[ $TRAVIS_OS_NAME = "osx" ]]; then wine64 --version; fi
- if [[ $TRAVIS_OS_NAME = "osx" && $GIT_VERSION = "edge" ]]; then brew reinstall git; fi
# windows
# required for git clone ("git-receive-pack") and submodule ("git-submodule") tests
- if [[ $TRAVIS_OS_NAME = "windows" ]]; then export "PATH=$PATH:/c/Program Files/Git/mingw64/libexec/git-core/"; fi
# currently fails with Exit code was '1'
- if [[ $TRAVIS_OS_NAME = "windows" && $GIT_VERSION = "edge" ]]; then choco install git; fi
install:
- npm ci
before_script:
- git config --global user.email "test@testy.com"
- git config --global user.name "Test testy"
- git --version
- DISPLAY= npm run package
after_success:
- npm run travisnpmpublish
before_deploy:
- npm run electronpublish
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
name: ${TRAVIS_TAG}
file_glob: true
file: dist/*.zip
overwrite: true
skip_cleanup: true
body: "[Changelog](https://github.com/FredrikNoren/ungit/blob/master/CHANGELOG.md#${TRAVIS_TAG//[v\\.]})"
on:
tags: true
condition: $TRAVIS_OS_NAME = "linux" && $GIT_VERSION = "edge"