add ci and some fixes

This commit is contained in:
Simon Bruder 2018-04-12 16:38:04 +00:00
parent c35ed6dbc1
commit b0d831fe1a
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
5 changed files with 88 additions and 38 deletions

54
.drone.yml Normal file
View file

@ -0,0 +1,54 @@
pipeline:
build-latex:
image: jess/texlive
commands:
- apt-get update
- apt-get install -y --no-install-recommends wget rubber make inkscape
- ./compile.sh latex
build-libreoffice:
image: jess/libreoffice
commands:
- wget -P /usr/share/fonts -c -q
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraMono-Bold.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraMono-Medium.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraMono-Regular.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Bold.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-BoldItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Book.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-BookItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Eight.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-EightItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-ExtraBold.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-ExtraBoldItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-ExtraLight.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-ExtraLightItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Four.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-FourItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Hair.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-HairItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Heavy.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-HeavyItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Light.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Italic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-LightItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Medium.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-MediumItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Regular.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-SemiBold.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-SemiBoldItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Thin.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-ThinItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Two.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-TwoItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-Ultra.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-UltraItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-UltraLightItalic.ttf
https://cdn.jsdelivr.net/npm/mozilla-fira-pack/Fira/ttf/FiraSans-UltraLight.ttf
- ./compile.sh libreoffice
build-revealjs:
image: node:alpine
commands:
- apk add --no-cache make
- ./compile.sh revealjs

4
.gitmodules vendored
View file

@ -1,5 +1,5 @@
[submodule "latex/mtheme"] [submodule "mtheme"]
path = latex/mtheme path = mtheme
url = https://github.com/matze/mtheme url = https://github.com/matze/mtheme
[submodule "revealjs/amnesty/amnesty-dp-2016"] [submodule "revealjs/amnesty/amnesty-dp-2016"]
path = revealjs/amnesty/amnesty-dp-2016 path = revealjs/amnesty/amnesty-dp-2016

View file

@ -1,3 +1,6 @@
.PHONY: default
default:
.PHONY: clean .PHONY: clean
clean: clean:
find latex \ find latex \
@ -12,7 +15,7 @@ clean:
-o -iname "*.eps" \ -o -iname "*.eps" \
\) \ \) \
-delete -delete
find . -iname "*.pdf" -type f -delete find latex revealjs -iname "*.pdf" -type f -delete
rm -rf latex/fonts revealjs/node_modules rm -rf latex/fonts revealjs/node_modules
latex/fonts: latex/fonts:

View file

@ -1,39 +1,32 @@
#!/bin/bash #!/bin/sh
set -e case "$1" in
set -x "latex")
make fonts
##
# Build LaTeX documents
##
make fonts
for presi in latex/*;do
# [ "$presi" == "latex/mtheme" ] && break
# [ "$presi" == "latex/fonts" ] && break
for presi in latex/*;do
for file in $presi/*.svg;do for file in $presi/*.svg;do
[ -e "$file" ] && make "${file%.svg}".eps [ -e "$file" ] && make "${file%.svg}".eps
done done
[ -e "$presi/index.tex" ] && make "$presi/index.pdf" [ -e "$presi/index.tex" ] && make "$presi/index.pdf"
done
true
;;
"libreoffice")
for presi in latex/* revealjs/*;do
[ -e "$presi/handout.odt" ] && make "$presi/handout.pdf" [ -e "$presi/handout.odt" ] && make "$presi/handout.pdf"
done done
;;
## "revealjs")
# install nodejs modules make revealjs/node_modules
##
make revealjs/node_modules
##
# Build PDF for revealjs
##
for presi in revealjs/*;do
# [ "$presi" == "revealjs/node_modules" ] && break
for presi in revealjs/*;do
[ -e "$presi/index.html" ] && make "$presi/index.pdf" [ -e "$presi/index.html" ] && make "$presi/index.pdf"
done
[ -e $presi/handout.odt ] && make "$presi/handout.pdf" ;;
done *)
echo "USAGE: $0 [MODE]"
echo "modes: latex libreoffice revealjs"
;;
esac