forked from stormpath/express-stormpath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (54 loc) · 2.49 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
language: node_js
sudo: false
node_js:
- '0.10'
- '0.12'
- '4'
- '6'
install:
- npm install
- test -z "$BUILD_DOCS" || pip install --user sphinx
script:
- travis_retry npm run test-travis
- test -z "$BUILD_DOCS" || cd docs
- test -z "$BUILD_DOCS" || make html
- test -z "$BUILD_DOCS" || cd ..
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- test -z "$BUILD_DOCS" || CURRENT_HASH=`git rev-parse HEAD`
- test -z "$BUILD_DOCS" || RELEASE_VERSION=`git tag | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -n 1`
- test -z "$BUILD_DOCS" || RELEASE_HASH=`git rev-list $RELEASE_VERSION -n 1`
- test -z "$BUILD_DOCS" || if [ "$CURRENT_HASH" = "$RELEASE_HASH" ]; then DEPLOY_DOCS=true; fi
- test -z "$DEPLOY_DOCS" || git config --global user.email "[email protected]"
- test -z "$DEPLOY_DOCS" || git config --global user.name "express-stormpath Auto Doc Build"
- test -z "$DEPLOY_DOCS" || git clone [email protected]:stormpath/stormpath.github.io.git
- test -z "$DEPLOY_DOCS" || cd stormpath.github.io
- test -z "$DEPLOY_DOCS" || git fetch origin source:source
- test -z "$DEPLOY_DOCS" || git checkout source
- test -z "$DEPLOY_DOCS" || rm -rf source/nodejs/express/latest
- test -z "$DEPLOY_DOCS" || cp -r ../docs/_build/html source/nodejs/express/latest
- test -z "$DEPLOY_DOCS" || cp -r ../docs/_build/html source/nodejs/express/$RELEASE_VERSION
- test -z "$DEPLOY_DOCS" || git add --all
- test -z "$DEPLOY_DOCS" || git commit -m "express-stormpath release $RELEASE_VERSION"
- test -z "$DEPLOY_DOCS" || git push origin source
env:
global:
- secure: M4UcXsvhjYXupsD0D+bAWdopk9JjOxKnHi5OcqCSZ4lCn6XZ3KlxMQC/VM8Ryhe3Y5dAcNnJOJSE0eeK+ojZERY2UcozYSjEIdTZjGDI1L4HM538GeRz8wLEIG18gRdSjsyVGjAOed+eZ/MQwo2xyIjVPjJBFJuy2Djtt4fi1sw=
- secure: LC2v9W0Nx8oviv+AajnXV1DOaiht+/1Hy92loa4a4Lbwz/NW0DmM9k1ollBFHpBhWVai3HaZKPl0XqdHqdq1fA2HppdJv8YbT/Hwkj1WdX+LRE/VUNevVc+MszlDJq1FOrgaEjiKyBqQP07RkZl4tg2kwpIET2Q0zmCubE7pezo=
matrix:
include:
- env: BUILD_DOCS=true
node_js: 'node'
before_install:
- openssl aes-256-cbc -K $encrypted_3f9d201aa5b8_key -iv $encrypted_3f9d201aa5b8_iv
-in deploy-key-stormpath-github-io-id-rsa.enc -out ~/.ssh/id_rsa
-d
- chmod 600 ~/.ssh/id_rsa
deploy:
provider: npm
email: [email protected]
api_key:
secure: CGXnok9fZxVnAi3Gdx+Px4I9d5vCBsiPw3smMc2tcB4mFIcAVfEQeMjIq9eHO2ZBeZax1Sc6CVdRviN0t+sCvsiM29ncs4c2VlpePqRaa4Rc0JLOXz76pIYxGKh3sgd7VDBGIQJPaoIp0nZnG+6o9GAK03k2lMyEO8NgE/6ZcsM=
on:
tags: true
repo: stormpath/express-stormpath