-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy path.travis.yml
77 lines (64 loc) · 2.28 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
language: java
script: ant ci
branches:
except:
- /dev-build-.*/
before_script:
|
if [ ! -z "$TRAVIS_TAG" ]; then
echo -e "Incrementing version for release build...\n"
sed -i "/^version:/ s/.*/version: $TRAVIS_TAG/" $TRAVIS_BUILD_DIR/src/plugin.yml
git config --global user.email "[email protected]"
git config --global user.name "travis-ci"
git add -f $TRAVIS_BUILD_DIR/src/plugin.yml
git commit -m "Updated version for build release"
git push --quiet https://[email protected]/Codisimus/PhatLoots
else
echo -e "Appending build number to version for dev build...\n"
sed -i "/^version:/ s/.$/+$TRAVIS_BUILD_NUMBER/" $TRAVIS_BUILD_DIR/src/plugin.yml
cat $TRAVIS_BUILD_DIR/src/plugin.yml
fi
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://[email protected]/Codisimus/PhatLoots 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:
|
if [ -z "$TRAVIS_TAG" ]; then
echo -e "Creating tag for dev build...\n"
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/PhatLoots $GIT_TAG
echo -e "New tag $GIT_TAG \n"
fi
deploy:
- provider: releases
prerelease: true
api_key: $AUTH_TOKEN
file: "dist/PhatLoots.jar"
skip_cleanup: true
on:
branch: master
tags: false
- provider: releases
prerelease: false
api_key: $AUTH_TOKEN
file: "dist/PhatLoots.jar"
skip_cleanup: true
on:
tags: true