forked from stormpath/express-stormpath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (64 loc) · 3.13 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
language: node_js
sudo: false
node_js:
- '0.10'
- '0.11'
- '0.12'
- '4.0'
- '4.1'
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 "$BUILD_DOCS" || echo $RELEASE_VERSION
- test -z "$BUILD_DOCS" || echo $CURRENT_HASH
- test -z "$BUILD_DOCS" || echo $RELEASE_HASH
- test -z "$BUILD_DOCS" || echo $DEPLOY_DOCS
- 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" || ls -la source/nodejs/express
- test -z "$DEPLOY_DOCS" || git push origin source
- test -z "$DEPLOY_DOCS" || gem install bundler
- test -z "$DEPLOY_DOCS" || bundle install
- test -z "$DEPLOY_DOCS" || rake setup_github_pages[[email protected]:stormpath/stormpath.github.io.git]
- test -z "$DEPLOY_DOCS" || cd _deploy
- test -z "$DEPLOY_DOCS" || git pull --no-edit -s recursive -X theirs https://github.com/stormpath/stormpath.github.io.git
- test -z "$DEPLOY_DOCS" || cd ..
- test -z "$DEPLOY_DOCS" || rake generate
- test -z "$DEPLOY_DOCS" || cd _deploy
- test -z "$DEPLOY_DOCS" || git pull --no-edit -s recursive -X theirs https://github.com/stormpath/stormpath.github.io.git
- test -z "$DEPLOY_DOCS" || cd ..
- test -z "$DEPLOY_DOCS" || rake deploy
- test -z "$DEPLOY_DOCS" || cd ..
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: '4.1'
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