blob: 17e4941b38fda8c7ed75cc88beba9fd6d83ab9b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
image: debian/testing
packages:
- pandoc
- weasyprint
- poppler-utils
sources:
- https://git.sr.ht/~boringcactus/crowbar-spec
environment:
files: "index vs-c tagged-unions types safety errors syntax LICENSE"
tasks:
- build-html: |
cd crowbar-spec
i=0
for file in $files
do
pandoc --defaults=etc/md.yml --number-offset=$i -o $file.html $file.md
i=$((i+1))
done
tar czvf ../spec-html.tar.gz *.html
- build-pdf: |
cd crowbar-spec
if git describe --tags --exact-match 2>/dev/null
then
metadata="subtitle=$(git describe --tags --exact-match)"
else
metadata="version=$(git log -1 --no-decorate --oneline)"
fi
pandoc --defaults=etc/pdf.yml -o ../spec.pdf -M "$metadata" $(echo $files | awk '{ for (i=1; i<=NF; i++) printf "%s.html ", $i }')
- test-page-count: |
pages=$(pdfinfo spec.pdf | grep Pages | awk '{ print $2 }')
test $pages -le 200
artifacts:
- spec.pdf
- spec-html.tar.gz
|