summaryrefslogtreecommitdiff
path: root/Makefile
blob: 05af8fec30317de2cdd47289854ed98364122a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.PHONY: serve build compress deploy clean


serve:
	EXECJS_RUNTIME=MiniRacer bundle exec jekyll serve --livereload --incremental


build:
	EXECJS_RUNTIME=MiniRacer JEKYLL_ENV=production bundle exec jekyll build


FINDARGS1 = -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js"
FINDARGS2 = -name "*.svg" -o -name "*.webmanifest" -o -name "*.ico" -o -name "*.txt"
compress:
	for f in `find public/ -type f $(FINDARGS1) -o $(FINDARGS2)`; do \
		echo "Compressing $$f..." ;    \
		gzip   --keep --force -9 $$f ; \
		brotli --keep --force -Z $$f ; \
	done


deploy:
	rsync --rsh="ssh -p $(PORT)" --stats --checksum --recursive public/ $(HOST):/srv/prefetch.eu/public/


clean:
	rm -rf public/*
	rm -rf source/.jekyll-cache/*