summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-06-09 09:29:52 +0300
committerLars Wirzenius <liw@liw.fi>2019-06-09 09:29:52 +0300
commit34fc69354368619ab73aabc94616491d585bd21d (patch)
tree726c3c0600ea891a63ff577fab6670d45baf15e6
parent1e6779632640d6c47ea3657ba00df9c306ca4f18 (diff)
downloadfable-poc-34fc69354368619ab73aabc94616491d585bd21d.tar.gz
Change: set doc date metadata to git-describe or date(1)0.1
-rwxr-xr-xpandoc.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/pandoc.sh b/pandoc.sh
index 7372f3f..881e00a 100755
--- a/pandoc.sh
+++ b/pandoc.sh
@@ -2,12 +2,18 @@
set -eu
+docdate()
+{
+ git describe --dirty HEAD 2> /dev/null || date -R
+}
+
pandoc \
--filter ./pandoc-fable-filter \
--toc \
--number-sections \
--standalone \
--self-contained \
+ "-Vdate:$(docdate)" \
-Vdocumentclass:report \
-Vtitlepage:true \
-Vfontsize:12pt \