aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-22 22:37:58 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-22 22:37:58 +0000
commit137994df5ca3aa3fba97c0e1718ec45af309bebe (patch)
tree450d879b5b30c0571ce7ed1928d337ce7146ab25 /scripts
parent224e252ca23d5dcaef2f6236a497e6f42cf49016 (diff)
parent0f9d8a7f951a58252175c0b3280f24ef6529150f (diff)
downloadYAGE-137994df5ca3aa3fba97c0e1718ec45af309bebe.tar.gz
YAGE-137994df5ca3aa3fba97c0e1718ec45af309bebe.zip
Merge branch 'develop'
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/travis_build33
-rwxr-xr-xscripts/update_docs17
-rwxr-xr-xscripts/update_version38
3 files changed, 33 insertions, 55 deletions
diff --git a/scripts/travis_build b/scripts/travis_build
new file mode 100755
index 00000000..40c774eb
--- /dev/null
+++ b/scripts/travis_build
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+# check compiler versions
+$CC --version
+$CXX --version
+
+# go to correct directory
+cd $TRAVIS_BUILD_DIR
+
+# start building
+mkdir -p build
+cd build
+cmake ..
+make
+cd tests
+ctest
+cd ../..
+
+# update docs if we are on the master branch
+if [[ $TRAVIS_BRANCH = "master" && $BUILD_DOCS -eq 1 ]]; then
+ if [[ -d "$TRAVIS_BUILD_DIR/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
+ cd ..
+ fi
+fi
diff --git a/scripts/update_docs b/scripts/update_docs
deleted file mode 100755
index cf117f73..00000000
--- a/scripts/update_docs
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-if [[ "$TRAVIS_BRANCH" == "master" ]]; then
- doxygen ./docs/Doxyfile
- if [ -d "$TRAVIS_BUILD_DIR/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 ../html/* .
- git add -A .
- git commit -m "Rebuilding documentation"
- git push -q origin gh-pages
- cd ..
- fi
-fi
diff --git a/scripts/update_version b/scripts/update_version
deleted file mode 100755
index 9c618fa6..00000000
--- a/scripts/update_version
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-# -----------------------------------------------------------------------------
-# @file: add_version_headers
-#
-# Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
-# MIT License, see LICENSE file for more details.
-# -----------------------------------------------------------------------------
-
-
-import os
-import re
-import sys
-
-
-def main(argv):
- cwd = os.path.join(os.getcwd(), argv[2])
- cmake = os.path.join(cwd, "CMakeLists.txt")
- doxyfile = os.path.join(cwd, "docs", "Doxyfile")
-
- with open(cmake, "r+") as f_:
- src = f_.read()
- f_.seek(0)
- src = re.sub(r"(project\(\w+\s+VERSION\s+)[0-9.]+", r"\g<1>{0}.0".format(argv[1]), src, re.MULTILINE)
- f_.write(src)
- f_.truncate()
-
- with open(doxyfile, "r+") as f_:
- src = f_.read()
- f_.seek(0)
- src = re.sub(r"(PROJECT_NUMBER\s+=\s+v)[0-9.]+", r"\g<1>{0}".format(argv[1]), src, re.MULTILINE)
- f_.write(src)
- f_.truncate()
-
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv))