-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis-ci.sh
41 lines (31 loc) · 1.02 KB
/
.travis-ci.sh
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
echo "yes" | sudo add-apt-repository ppa:avsm/ppa
sudo apt-get update -qq
sudo apt-get install ocaml ocaml-native-compilers camlp4-extra opam opam
export OPAMYES=1
opam init
opam update
opam install oasis ocamlfind calendar xmlm uri lwt cohttp
eval `opam config env`
./configure --enable-tests
make
make test
if [ "$TRAVIS_REPO_SLUG" == "Cumulus/Syndic" ] \
&& [ "$TRAVIS_PULL_REQUEST" == "false" ] \
&& [ "$TRAVIS_BRANCH" == "master" ]; then
echo -e "Publishing ocamldoc...\n"
git config --global user.email "[email protected]"
git config --global user.name "travis-ci"
git clone https://${GH_TOKEN}@github.com/Cumulus/Syndic .documentation
cd .documentation
git fetch
git checkout gh-pages
git merge master --commit -m "Merge master into gh-pages"
./configure
make doc
git add -f doc/
if [ -n "$(git status --untracked-files=no --porcelain)" ]; then
git commit -m "Update documentation $TRAVIS_BUILD_NUMBER"
git push -fq origin gh-pages
fi
echo -e "Published ocamldoc to gh-pages.\n"
fi