aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-10-12 14:57:26 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-10-12 14:57:26 +0100
commit1bb0ef8960c71ef505a351702bec54c01ba15e22 (patch)
tree365811364237f1e55e66f421b93cad8adcf51eda /scripts
parentba733040afb85d4c287a2ec464db05cb86a53fca (diff)
downloadYAGE-1bb0ef8960c71ef505a351702bec54c01ba15e22.tar.gz
YAGE-1bb0ef8960c71ef505a351702bec54c01ba15e22.zip
Fixing spritesheet and fixed #12
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/add_version_headers21
-rwxr-xr-xscripts/update_docs12
2 files changed, 14 insertions, 19 deletions
diff --git a/scripts/add_version_headers b/scripts/add_version_headers
index def7d55a..ffbdd036 100755
--- a/scripts/add_version_headers
+++ b/scripts/add_version_headers
@@ -8,17 +8,14 @@
# See file LICENSE for more details
# -----------------------------------------------------------------------------
-"""\file add_version_headers
-\brief Adds the version headers to every file.
+""" @file Adds the version headers to every file.
-Add Version Headers
-===================
+## Add Version Headers
This file adds the version headers to every file in the directory
-Improvements
-------------
+### Improvements
Add the ability to input command line arguments.
"""
@@ -48,7 +45,7 @@ class HeaderUpdate(object):
self.exclude_build = True
self.exclude_dir = ".*build.*"
self.match_dir = ""
- self.comment_match = "^\/[*] -+"
+ self.comment_match = "^\/\* -+"
self.starting_dir = os.getcwd()
for key, value in kwargs.items():
setattr(self, key, value)
@@ -72,8 +69,9 @@ class HeaderUpdate(object):
def _traverseDir(self, path, fileOperation):
for subdir, dirs, files in os.walk(os.getcwd()):
- if (not re.match(self.exclude_dir, subdir)) and \
- (re.match(self.match_dir, subdir)):
+ if (re.match(self.match_dir, subdir)) and \
+ (not re.match(self.exclude_dir, subdir)):
+ print(subdir)
for fileName in files:
if (re.match(self.match_re, fileName)) and \
(not re.match(self.exclude_re, fileName)):
@@ -84,9 +82,8 @@ class HeaderUpdate(object):
def main(argv):
- update = HeaderUpdate(exclude_re="^picopng[.]cpp",
- exclude_dir=".*build.*|.*google.*",
- match_dir=".*src.*|.*include.*|.*test.*")
+ update = HeaderUpdate(exclude_re="^picopng\.cpp",
+ match_dir=".*yage|.*tests")
update.writeHeader()
diff --git a/scripts/update_docs b/scripts/update_docs
index 19e47145..cf117f73 100755
--- a/scripts/update_docs
+++ b/scripts/update_docs
@@ -3,17 +3,15 @@
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
doxygen ./docs/Doxyfile
if [ -d "$TRAVIS_BUILD_DIR/html" ]; then
- cd $TRAVIS_BUILD_DIR/html
- git init
+ 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 ""
- git remote add upstream "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git"
- git fetch upstream
- git reset upstream/gh-pages
- touch .
+ rm -rf *
+ cp -r ../html/* .
git add -A .
git commit -m "Rebuilding documentation"
- git push -q upstream HEAD:gh-pages
+ git push -q origin gh-pages
cd ..
fi
fi