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

Add travis-ci build #25

Merged
merged 1 commit into from
Aug 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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

}