dirty handling

This commit is contained in:
Motiejus Jakštys 2020-05-22 22:18:15 +03:00
parent bca2bee91c
commit 7ea7632ae8

View File

@ -19,9 +19,10 @@ db/.faux_ready: zeimena.gpkg managedb
ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm" zeimena.gpkg
touch $@
DIRTY = $(shell git status --porcelain | awk 'NR==1{print "-dirty";exit}')
GIT_DIR = $(shell git rev-parse --show-toplevel)/.git
version.tex: $(shell git ls-files .) $(GIT_DIR)
date '+\gdef\GeneratedAt{%F %T %Z}%' > $@
printf '\gdef\VCDescribe{%s%s}%%\n' \
$(shell git describe --tags) \
$(shell git status --porcelain | awk 'NR==1{print "-dirty";exit}') >> $@
$(DIRTY) >> $@