Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #25 from lamtev/master
Browse files Browse the repository at this point in the history
Add travis-ci build
  • Loading branch information
ejiek authored Aug 7, 2016
2 parents 85c0062 + 24a9e51 commit 26e408e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: generic

dist: trusty

services:
- docker

install:
- docker pull lamtev/latex-build-tools

matrix:
include:
- env: LATEX_TEMPLATE="bachelor_thesis"
- env: LATEX_TEMPLATE="coursework"
- env: LATEX_TEMPLATE="presentation"
- env: LATEX_TEMPLATE="report"

script:
- chmod +x travis_build.sh
- docker run -v $TRAVIS_BUILD_DIR:/latex_templates lamtev/latex-build-tools /bin/bash -c " cd latex_templates && . ./travis_build.sh && build_latex_template $LATEX_TEMPLATE "
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions travis_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

build_latex_template()
{

if [ "$#" != "1" ]; then
echo "Invalid number of arguments!"
exit 1
fi

LATEX_TEMPLATE="$1"
cd $LATEX_TEMPLATE

pdflatex $LATEX_TEMPLATE.tex
if [ "$LATEX_TEMPLATE" == "bachelor_thesis" ] || [ "$LATEX_TEMPLATE" == "coursework" ]; then
bibtex $LATEX_TEMPLATE.aux
fi
pdflatex $LATEX_TEMPLATE.tex
pdflatex $LATEX_TEMPLATE.tex

}

0 comments on commit 26e408e

Please sign in to comment.