-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
52 lines (44 loc) · 1.45 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
language: java
script: ant ci
branches:
except:
- /dev-build-.*/
after_deploy:
|
if [ "$TRAVIS_BRANCH" == "master" ]; then
echo -e "Publishing javadoc...\n"
cp -R dist/javadoc $HOME/javadoc-latest
cd $HOME
git config --global user.email "[email protected]"
git config --global user.name "travis-ci"
git clone --quiet --branch=gh-pages https://${AUTH_TOKEN}@github.com/Codisimus/Turnstile gh-pages > /dev/null
cd gh-pages
git rm -rf ./javadoc
cp -Rf $HOME/javadoc-latest ./javadoc
git add -f .
git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
git push -fq origin gh-pages > /dev/null
echo -e "Published Javadoc to gh-pages.\n"
fi
before_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- export GIT_TAG=dev-build-$TRAVIS_BUILD_NUMBER
- git tag $GIT_TAG -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER on $(date -u "+%Y-%m-%d-%H-%M-%S")"
- git push --quiet https://[email protected]/Codisimus/Turnstile $GIT_TAG
deploy:
- provider: releases
prerelease: true
api_key: $AUTH_TOKEN
file: "dist/Turnstile.jar"
skip_cleanup: true
on:
branch: master
tags: false
- provider: releases
prerelease: false
api_key: $AUTH_TOKEN
file: "dist/Turnstile.jar"
skip_cleanup: true
on:
tags: true