Harald Welte has submitted this change and it was merged. Change subject: all: show 'DRAFT' watermark on the first page ......................................................................
all: show 'DRAFT' watermark on the first page Unconditionally show a 'DRAFT' watermark only on the first page of each document. I would have liked to make this conditional based on the BUILD_RELEASE=* variable, but could not figure out how to switch off a .sty code segment based on command line parameters. Since we only seem to render all manuals in DRAFT mode all the time, it seems reasonable to include the DRAFT watermark always, requiring manual .sty editing if anyone wanted to build a non-DRAFT version. In the makefile, add an echo to say so in case of non-draft builds. Change-Id: Ia71795481c2467aab11ab344517df74775b2a852 --- M build/Makefile.asciidoc.inc M build/custom-dblatex.sty 2 files changed, 12 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 82721ff..56a6ed9 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -29,7 +29,14 @@ all: $(ASCIIDOCPDFS) -$(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc +.PHONY: hint_to_remove_draft_mode +hint_to_remove_draft_mode: + @test -n "$(BUILD_RELEASE)" && echo -e "\n\n\ + NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT build/custom-dblatex.sty\n\ + and remove three lines starting with '% \"DRAFT\" on first page'\n" \ + || true + +$(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc hint_to_remove_draft_mode a2x $(A2X_OPTS) $< || asciidoc -v $(ASCIIDOC_OPTS) $< check: $(ASCIIDOC_CHECKS) diff --git a/build/custom-dblatex.sty b/build/custom-dblatex.sty index a3822b5..41e7c70 100644 --- a/build/custom-dblatex.sty +++ b/build/custom-dblatex.sty @@ -19,6 +19,10 @@ \usepackage{alltt} \usepackage{upquote} +% "DRAFT" on first page +\definecolor{LtGrey}{rgb}{0.875,0.875,0.875} +\AddToShipoutPicture*{ \AtTextCenter{ \makebox(0,0)[c]{\resizebox{\textwidth}{!}{ \rotatebox{45}{\textsf{\textbf{\color{LtGrey}DRAFT}}}}} } } + \def\Company{sysmocom - s.f.m.c. GmbH} \def\DBKcover{ -- To view, visit https://gerrit.osmocom.org/2839 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia71795481c2467aab11ab344517df74775b2a852 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder