#!/bin/sh

if [[ $# -ne 1 ]]; then
	echo expected revision as option >&2
	exit 1
fi

revision="$1"
commit_date=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)

asciidoctor-pdf -a revnumber=${revision} -a revdate=${commit_date} -o angelguide_en.pdf guide.adoc
asciidoctor-pdf -a revnumber=${revision} -a revdate=${commit_date} -o angelguide_de.pdf -a lang=de guide.adoc
