forked from falsandtru/pjax-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (55 loc) · 2.05 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
language: node_js
node_js:
- 0.10
env:
global:
- secure: "fB15BBKr9RlhfXqFfK/tBZTun83uLi3V7gIHMOkWoxjzF9tP/dI+QTu7pDICpOGeuDsVUdmEdW/Tqb/gpUemLI2r07NKz57ceY5LPPv8+Bzqkvh6XLKhjAyxWgPdzMRxI6lxNRjAAnti99a8EzIRjAVf4YabTsWgKX74vFJnI7A="
- GIT_REPO=jquery.pjax.js
- GIT_COMMITTER_NAME=Travis-CI
- GIT_COMMITTER_EMAIL=Travis-CI
- GIT_AUTHOR_NAME=falsandtru
- GIT_AUTHOR_EMAIL=falsandtru
matrix:
- jquery=1.4.2
output=false
- jquery=1.5.0
output=false
- jquery=1.6.0
output=false
- jquery=1.7.2
output=true
- jquery=1.11.1
output=false
- jquery=2.1.1
output=false
script:
- grunt travis
after_success:
- if [ $TRAVIS_BRANCH != "master" ] || [ ! $GH_TOKEN ]; then exit 0; fi
- if [ $output == "false" ]; then exit 0; fi
- mkdir ../gh-pages
- cp -rf ./gh-pages ../
- cp -rf ./test ../gh-pages
- cat package.json | json version
- new_version=`cat package.json | json version | awk -F. '{printf("%d%05d%06d", ++$1, $2, $3)}'`
- git reset --hard HEAD~
- cat package.json | json version
- cat package.json | json version | awk -F. '{printf("%d%05d%06d", ++$1, $2, $3)}'
- old_version=`cat package.json | json version | awk -F. '{printf("%d%05d%06d", ++$1, $2, $3)}'`
- git reset --hard ORIG_HEAD
- if [ $new_version -lt $old_version ]; then exit 0; fi
- git fetch origin gh-pages:gh-pages
- git checkout --orphan gh-pages
- git checkout -m gh-pages
- ls -a | grep -vE "^.git$|^\.+$" | xargs rm -rf
- cp -rf ../gh-pages/* ./
- find | grep -vE "^./.git(/|$)"
- git add -A :/
- git commit -m 'Deploy by Travis-CI'
- git push https://${GH_TOKEN}@github.com/${GIT_AUTHOR_NAME}/${GIT_REPO}.git gh-pages:gh-pages 2>&1 | sed -e "s/:\/\/\w\+@/:\/\/[secure]@/g"
notifications:
email:
recipients:
- secure: "d3l1hjddikZY14QJhyRA6ChAJ+3LlmlmIVDXauza6TcVOxWnmb9GpEPIJvvN+TLy4wM4y9lQargQW1/PRAIG+JJg5pQ5Yw41F19DNkeAdNKrHJ7gC3NskT8EXoU4o68nyG/9BNEZyHnUJwWXF8yBVu6mI1ezkKBHkyZh6mFNsME="
on_success: change # default: change
on_failure: always # default: always