robertodr / totaltrash.xyz
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
29
30
PIJULSHA := $(shell find .pijul/patches -type f -exec stat -c "%y %n" '{}' + | sort -r | head -n 1 | cut -d ' ' -f4 | xargs basename --suffix '.sig')
get-pijul-info:
echo $(PIJULSHA) > .pijulinfo
build: get-pijul-info css/style.css
stack build ${SOPTS}
stack exec totaltrash-exe build
rebuild: css/style.css
stack build ${SOPTS}
stack exec totaltrash-exe rebuild
css/%.css: css/%.sass
stack exec sassc $< $@
clean:
rm -rf _site _cache
stack clean
serve-totaltrash.xyz:
git clone --depth 1 --single-branch git@github.com:robertodr/totaltrash.xyz.git $@
deploy: serve-totaltrash.xyz build
@mkdir -p serve-totaltrash.xyz/docs && cp -r _site/* serve-totaltrash.xyz/docs
git -C serve-totaltrash.xyz add -A
git -C serve-totaltrash.xyz commit -m "Serving website" -m "Served from Pijul patch: $(PIJULSHA)"
git -C serve-totaltrash.xyz push -fu
.PHONY: build rebuild