-
Notifications
You must be signed in to change notification settings - Fork 88
/
.travis.yml
86 lines (76 loc) · 2.72 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
75
76
77
78
79
80
81
82
83
84
85
86
sudo: false
language: node_js
env:
global:
- CXX=g++-4.8
- secure: "l/McmiK4djffT04/+5MxW9sy4yO80Rf6vq+nZb5P647A6pXpPLdoRLGo50CtYRiKnFLiChHk2QxUOspeKuIKE+UQAm9dGmyMgfYkj/jwxIBd0YQqavaGzoWo5U1ZSGKeVd3kJlIaUJyLlnKbBOmFCY00c4JLveAagsV53lbephY="
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- python-virtualenv
node_js:
- "4"
- "0.10"
cache:
apt: true
directories:
- node_modules
before_script:
- npm prune
- if [ ${TRAVIS_REPO_SLUG}-${TRAVIS_PULL_REQUEST} = camptocamp/ngeo-false ] ; then openssl aes-256-cbc -K $encrypted_66d875d20fac_key -iv $encrypted_66d875d20fac_iv -in secrets.tar.enc -out secrets.tar -d; fi
- if [ ${TRAVIS_REPO_SLUG}-${TRAVIS_PULL_REQUEST} = camptocamp/ngeo-false ] ; then tar xvf secrets.tar; fi
- if [ ${TRAVIS_REPO_SLUG}-${TRAVIS_PULL_REQUEST} = camptocamp/ngeo-false ] ; then cp .transifexrc $HOME/.transifexrc; fi
- if [ ${TRAVIS_REPO_SLUG}-${TRAVIS_PULL_REQUEST} = camptocamp/ngeo-false ] ; then cp ngeo_deploy_key $HOME/.ssh/id_rsa; fi
- if [ ${TRAVIS_REPO_SLUG}-${TRAVIS_PULL_REQUEST} = camptocamp/ngeo-false ] ; then chmod 600 $HOME/.ssh/id_rsa; fi
- git config --global user.name "Travis"
- git config --global user.email "travis@travis-ci.org"
script:
- if [ ${TRAVIS_PULL_REQUEST} != "false" ] ; then git fetch origin ${TRAVIS_BRANCH}:${TRAVIS_BRANCH}; fi
- if [ ${TRAVIS_PULL_REQUEST} != "false" ] ; then git diff --check ${TRAVIS_BRANCH} -- ; fi
- if [ "`git grep @fileoverview src contribs`" != "" ] ; then echo "Using @fileoverview breaks the documentation main page" ; false ; fi
- if [ "`git grep @example src contribs`" != "" ] ; then echo "We don't use @example to have the example in the description" ; false ; fi
- make check
- make .build/examples-hosted/index.html
- make .build/examples-hosted/contribs/gmf/index.html
- make apidoc
after_success:
- 'cat .build/coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js'
before_deploy:
- export GIT_BRANCH=${TRAVIS_BRANCH}
- .build/python-venv/bin/pip install jsongrep
- echo "_auth = ${NPM_AUTH}" > ~/.npmrc
- echo "email = stephane.brunner@camptocamp.com" >> ~/.npmrc
- ls -l ~/.npmrc
- cat ~/.npmrc
deploy:
- provider: script
script: make gh-pages
skip_cleanup: true
on:
repo: camptocamp/ngeo
all_branches: true
node: "0.10"
- provider: script
script: npm publish
skip_cleanup: true
on:
node: "0.10"
repo: camptocamp/ngeo
tags: true
condition: '"`.build/python-venv/bin/jsongrep -e version package.json`" == "${TRAVIS_TAG}"'
- &transifex
provider: script
script: make transifex-send
skip_cleanup: true
on:
repo: camptocamp/ngeo
branch: master
node: "0.10"
- <<: *transifex
on:
repo: camptocamp/ngeo
branch: 2.0
node: "0.10"