summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-04 07:26:37 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-04 07:37:21 +0200
commitdf7ec5a70f0effd1c7749392a86c3d7adaf83364 (patch)
tree1249e28633ddc9ba99148ee94568c94f809b9cf8 /Makefile
parentb2f92f6011e27de75b38ea5e88f2390cfea2fa78 (diff)
downloadmutti-web-df7ec5a70f0effd1c7749392a86c3d7adaf83364.tar.gz
mutti-web-df7ec5a70f0effd1c7749392a86c3d7adaf83364.tar.bz2
mutti-web-df7ec5a70f0effd1c7749392a86c3d7adaf83364.zip
Add git hash as query string to resources
..to be able to set an infinite cache for the browser, but to invalidate the resources for every git commit (That may be a waste of resources, but is "most safe" to ensure we get an up to date site) It has to be explicitly defined in the template. Occurences of the img-tag in the source files get the git hash automatically appended.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a36830b..01cb9b0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
suffix = .xhtml
+version = $(shell git rev-parse --short HEAD)
-xsltproc=xsltproc --stringparam suffix $(suffix) --stringparam stylesheet style.min.css
+xsltproc=xsltproc --stringparam suffix $(suffix) --stringparam stylesheet style.min.css --stringparam version $(version)
svg2png=rsvg-convert -f png
pages=$(shell xsltproc xsl/main_filenames.xsl main.xml)