-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathtravis.sh
executable file
·39 lines (35 loc) · 1.26 KB
/
travis.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
#!/bin/bash
function build_doc {
#git clone -b libdparse https://github.com/BlackEdder/harbored-mod.git
#git clone https://github.com/nemanja-boric-sociomantic/harbored-mod.git
#cd harbored-mod
#dub upgrade
#dub build
#cd ..
#./harbored-mod/bin/hmod source/
wget http://releases.defenestrate.eu/harbored-mod-0.2.0/hmod-x86-64.tar.gz
tar xf hmod-x86-64.tar.gz
./hmod source/
}
set -e -o pipefail
dub test --compiler=${DC}
if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then # gtkd broken on osx
dub test -c ggplotd-gtk --compiler=${DC}
fi
if [[ $TRAVIS_BRANCH == 'master' ]] ; then
if [ ! -z "$GH_TOKEN" ]; then
git checkout master
build_doc
cd doc
mkdir images
cp ../*.{png,svg} images/
git init
git config user.name "Travis-CI"
git config user.email "[email protected]"
git add .
git commit -m "Deployed to Github Pages"
#git push --force --quiet "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}" HEAD:gh-pages > /dev/null 2>&1
git push --force --quiet "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}" master:gh-pages > /dev/null 2>&1
#git push --force "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}" HEAD:gh-pages
fi
fi