From 12d52a760cd6f725a9c07d841a043a21a2c4fe2c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 4 May 2019 14:15:47 +0300 Subject: Fix: get date from git into document --- Makefile | 4 +++- docid | 2 +- saga.pdf | Bin 143563 -> 143543 bytes saga.yarn | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cd287a4..fe8af54 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ all: muck1.pdf muck2.pdf muck3.pdf jt1.pdf jt2.pdf saga.pdf %.pdf: %.yarn - pandoc -o $@ $< \ + sed "s/%VERSION%/$$(./docid "$<")/" "$<" > tmp + pandoc -o $@ tmp \ --number-sections \ --toc \ --top-level-division=chapter \ @@ -13,3 +14,4 @@ all: muck1.pdf muck2.pdf muck3.pdf jt1.pdf jt2.pdf saga.pdf -Vsansfont:FreeSans \ -Vmonofont:FreeMonoBold \ -Vgeometry:top=2cm,bottom=2.5cm,left=2cm,right=1cm +# rm -f tmp diff --git a/docid b/docid index ce3612a..22dc1f5 100755 --- a/docid +++ b/docid @@ -2,5 +2,5 @@ set -eu -git show "$1" | sed -n '/^Date: */s///p' +git log "$1" | sed '/^$/,$d' | sed -n '/^Date: */s///p' diff --git a/saga.pdf b/saga.pdf index 81d3631..fec0683 100644 Binary files a/saga.pdf and b/saga.pdf differ diff --git a/saga.yarn b/saga.yarn index a62a036..e7f03ac 100644 --- a/saga.yarn +++ b/saga.yarn @@ -3,7 +3,7 @@ title: Acceptance testing using Saga author: - Lars Wirzenius - Daniel Silverstone -date: WIP +date: %VERSION% keywords: - automated acceptance testing - scenario testing -- cgit v1.2.1