From 3aba19102e063ee7ff4e8b2861453c9d6415fa45 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 2 Jan 2020 11:58:44 -0800 Subject: [PATCH 1/2] Support rendering via Docker. --- Dockerfile | 11 +++++++++++ render-via-docker.sh | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 Dockerfile create mode 100755 render-via-docker.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ede27aff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:latest + +RUN apt-get update \ + && apt-get install -y \ + python3 \ + python-pip + +RUN pip install rst2html5 + +WORKDIR "/zips" +ENTRYPOINT ["make"] diff --git a/render-via-docker.sh b/render-via-docker.sh new file mode 100755 index 00000000..c0fe0947 --- /dev/null +++ b/render-via-docker.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -efuxo pipefail + +TAG='zcash-zips-render' + +docker build -t "$TAG" . +docker run -v "$(pwd):/zips" "$TAG" From d81c846af0e2376e7e386a51f20063a32240fed7 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 5 Jan 2020 12:54:51 -0800 Subject: [PATCH 2/2] Modify root Makefile to build protocol with the 'all' target; update Docker to include protocol render toolchain. --- Dockerfile | 8 +++++++- Makefile | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ede27aff..1b4ec0e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,14 @@ FROM debian:latest RUN apt-get update \ && apt-get install -y \ + gawk \ + biber \ + latexmk \ + perl \ python3 \ - python-pip + python-pip \ + texlive-bibtex-extra \ + texlive-generic-recommended RUN pip install rst2html5 diff --git a/Makefile b/Makefile index 143061e8..64a71ae3 100644 --- a/Makefile +++ b/Makefile @@ -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)" $< >$@