aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-06-02 14:42:18 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-06-02 14:42:18 +0100
commit320553f8c174c4f642d4b6a571de068eca5447f9 (patch)
tree3bb83c1feaa2262509383cb97574923eaad25083
parent641d61c61dfdbf2b818638ac44b89f27401422b6 (diff)
downloadYAGE-320553f8c174c4f642d4b6a571de068eca5447f9.tar.gz
YAGE-320553f8c174c4f642d4b6a571de068eca5447f9.zip
Updating build script
-rwxr-xr-xscripts/travis_build36
1 files changed, 21 insertions, 15 deletions
diff --git a/scripts/travis_build b/scripts/travis_build
index 1efb9364..c249bb36 100755
--- a/scripts/travis_build
+++ b/scripts/travis_build
@@ -6,8 +6,10 @@ set -eu
$CC --version
$CXX --version
-# go to correct directory
-cd $TRAVIS_BUILD_DIR
+if [[ -z $TRAVIS_BUILD_DIR ]]; then
+ # go to correct directory
+ cd $TRAVIS_BUILD_DIR
+fi
# start building
mkdir -p build
@@ -19,21 +21,25 @@ ctest -j 2 --schedule-random --repeat-until-fail 3
cd ../..
# update docs if we are on the master branch
-echo "TRAVIS_BRANCH = " $TRAVIS_BRANCH
-echo "BUILD_DOCS = " $BUILD_DOCS
+if [[ -z $TRAVIS_BUILD_DIR ]]; then
+ echo "TRAVIS_BRANCH = " $TRAVIS_BRANCH
+ echo "BUILD_DOCS = " $BUILD_DOCS
+fi
echo "CC = " $CC
echo "CXX = " $CXX
-if [[ $TRAVIS_BRANCH = "master" && $BUILD_DOCS -eq 1 ]]; then
- if [[ -d "build/doc_doxygen/html" ]]; then
- git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages
- cd YAGE_gh-pages
- git config user.name "TravisBot"
- git config user.email ""
- rm -rf *
- cp -r ../build/doc_doxygen/html/* .
- git add -A .
- git commit -m "[Travis] Rebuilding documentation"
- git push -q origin gh-pages
+if [[ -z $TRAVIS_BUILD_DIR ]]; then
+ if [[ $TRAVIS_BRANCH = "master" && $BUILD_DOCS -eq 1 ]]; then
+ if [[ -d "build/doc_doxygen/html" ]]; then
+ git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages
+ cd YAGE_gh-pages
+ git config user.name "TravisBot"
+ git config user.email ""
+ rm -rf *
+ cp -r ../build/doc_doxygen/html/* .
+ git add -A .
+ git commit -m "[Travis] Rebuilding documentation"
+ git push -q origin gh-pages
+ fi
fi
fi