summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-01-17 16:49:19 +0100
committerYorhel <git@yorhel.nl>2021-01-17 17:00:46 +0100
commit074bf602f896ebd9eb3c8b2c130eca05299a44dc (patch)
treec16c42a0c54dfe11f5e38120429a984c9e2ed5ee /Makefile
parent7be45b3ed34537746454bf93e5a67be648b0b46a (diff)
Make/CSS: Put icons.css file hash in the URL
Advantage is that it's both more robust and avoids unecessary reloads when the file hasn't changed. The -strip argument to convert is needed in order to generate icons.png in a deterministic way; without that it includes a creation timestamp in the file metadata.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ad99c196..816f8d20 100644
--- a/Makefile
+++ b/Makefile
@@ -93,7 +93,7 @@ static/g/icons.opt.png: static/g/icons.png
zopflipng -m --lossy_transparent $< $@
static/g/%.css: css/skins/%.sass css/v2.css data/icons/icons.css | static/g
- ( echo '$$version: "$(shell git show-ref --head --abbrev -s HEAD)";'; echo '@import "css/skins/$*"' ) | sassc --stdin -I. --style compressed >$@
+ ( echo '$$icons-version: "$(shell sha1sum static/g/icons.png | head -c8)";'; echo '@import "css/skins/$*"' ) | sassc --stdin -I. --style compressed >$@