git ssb

0+

Grey the earthling / gkn.me.uk



Tree: ffdd8daff4715410cb83a5d5184b94b3111586ed

Files: ffdd8daff4715410cb83a5d5184b94b3111586ed / Makefile

1078 bytesRaw
1.PHONY: publish lint serve
2
3output: $(shell find content static) .cache/generator
4 python generator/generate.py
5 touch $@
6
7.cache/generator: $(shell find generator) .cache/deps
8 python -m black --experimental-string-processing .
9 touch $@
10
11.cache/deps: Makefile
12 pip install black
13 pip install beautifulsoup4==4.9.3
14 pip install marko==1.1.0
15 pip install python-frontmatter==1.0.0
16 mkdir -p .cache
17 touch $@
18
19publish: .cache/publish
20
21.cache/publish: output
22ifeq "${SSHUSER}" ""
23 @echo "SSHUSER is undefined"
24 exit 1
25else ifeq "${SSHPASS}" ""
26 @echo "SSHPASS is undefined"
27 exit 1
28else ifeq "${SSHDIR}" ""
29 @echo "SSHDIR is undefined"
30 exit 1
31else ifeq "${SSHPORT}" ""
32 @echo "SSHPORT is undefined"
33 exit 1
34else ifneq "$$(git status --porcelain)" ""
35 @echo "Uncommitted changes"
36 exit 1
37else
38 echo -e "cd ${SSHDIR} \n put -r output/* \n exit" | \
39 sshpass -e sftp -oBatchMode=no -b - sftp://${SSHUSER}@gkn.me.uk:${SSHPORT}
40 touch $@
41endif
42
43
44lint: $(shell find static/style)
45 toolbox run npx prettier -w static/style/tarazed.css
46
47serve: output
48 cd output && python -m http.server
49

Built with git-ssb-web