Merge pull request #311 from nathan-at-least/render-via-docker

Support rendering via Docker.
This commit is contained in:
Daira Hopwood 2020-01-06 04:39:55 +00:00 committed by GitHub
commit 901c1a7963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 2 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM debian:latest
RUN apt-get update \
&& apt-get install -y \
gawk \
biber \
latexmk \
perl \
python3 \
python-pip \
texlive-bibtex-extra \
texlive-generic-recommended
RUN pip install rst2html5
WORKDIR "/zips"
ENTRYPOINT ["make"]

View File

@ -2,11 +2,16 @@
# sudo apt-get install python-pip
# sudo pip install rst2html5
.PHONY: all
all:
.PHONY: all all-zips protocol
all-zips:
$(MAKE) README.rst
$(MAKE) index.html $(addsuffix .html,$(filter-out README,$(basename $(wildcard *.rst))))
all: all-zips protocol
protocol:
$(MAKE) -C protocol
index.html: README.rst
$(eval TITLE::=$(shell echo '$(basename $<)' | sed -r 's|zip-0{0,3}|ZIP |'): $(shell grep -E '^(\.\.)?\s*Title:' $< |sed 's|.*Title:\s*||'))
rst2html5 -v --title="$(TITLE)" $< >$@

7
render-via-docker.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -efuxo pipefail
TAG='zcash-zips-render'
docker build -t "$TAG" .
docker run -v "$(pwd):/zips" "$TAG"