diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-09-27 14:44:27 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-09-27 14:44:27 +0300 |
commit | 9e752df2b58a68cc68ffe075c43a6c1443fc297d (patch) | |
tree | f3ec98f2daf42e197465ea6cadb189173eefb038 | |
parent | 004a05036c6bc2483ea0dbc9e9ad487e5dbda4d7 (diff) | |
download | vmdb2-9e752df2b58a68cc68ffe075c43a6c1443fc297d.tar.gz |
Change: use "git describe" as version number in doc
-rwxr-xr-x | format.sh | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -2,6 +2,16 @@ set -eu +tmp="$(mktemp -d)" +cleanup() +{ + rm -rf "$tmp" +} +#trap cleanup EXIT + +version="$(git describe)" +sed "s/^date: .*/date: $version/" vmdb2.mdwn > "$tmp/prelude.mdwn" + pandoc \ --self-contained \ --standalone \ @@ -9,7 +19,7 @@ pandoc \ --toc \ --number-sections \ -o vmdb2.html \ - vmdb2.mdwn vmdb/plugins/*.mdwn + "$tmp/prelude.mdwn" vmdb/plugins/*.mdwn pandoc \ --pdf-engine=xelatex \ @@ -23,4 +33,4 @@ pandoc \ -Vmonofont:FreeMonoBold \ '-Vgeometry:top=2cm, bottom=2.5cm, left=2cm, right=1cm' \ -o vmdb2.pdf \ - vmdb2.mdwn vmdb/plugins/*.mdwn + "$tmp/prelude.mdwn" vmdb/plugins/*.mdwn |