improve version.tex
This commit is contained in:
parent
9f460a4c4f
commit
edd45c4ccd
@ -21,8 +21,7 @@ db/.faux_ready: zeimena.gpkg managedb
|
|||||||
|
|
||||||
GIT_DIR = $(shell git rev-parse --show-toplevel)/.git
|
GIT_DIR = $(shell git rev-parse --show-toplevel)/.git
|
||||||
version.tex: $(shell git ls-files .) $(GIT_DIR)
|
version.tex: $(shell git ls-files .) $(GIT_DIR)
|
||||||
( \
|
date "+\\gdef\\GeneratedAt{%F %T %Z}%" > $@
|
||||||
date "+\\gdef\\GeneratedAt{%F %T %Z}%"; \
|
printf '\gdef\VCDescribe{%s%s}%%\n' \
|
||||||
[ -n "$$(git status --porcelain)" ] && suffix="-dirty"; \
|
$(shell git describe --tags) \
|
||||||
git describe --tags | awk '{print "\\gdef\\VCDescribe{"$$0"'$$suffix'}%"}'; \
|
$(shell git status --porcelain | awk 'NR==1{print "-dirty";exit}') >> $@
|
||||||
) > $@
|
|
||||||
|
Loading…
Reference in New Issue
Block a user