-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (27 loc) · 943 Bytes
/
Makefile
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
31
32
33
34
35
36
37
CDN_BUCKET = obsidian_html
MDPATH ?= "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/personal"
build: requirements
.venv/bin/python run.py --path ${MDPATH} --use-git-times --feed link_blog --feed music_blog --feed blog
cp favicon.ico output/
# only for use in dev, for quick iteration
build-quick:
.venv/bin/python run.py --path ${MDPATH} --feed link_blog --feed music_blog --feed blog
requirements:
if [ ! -d ".venv" ]; then python -mvenv .venv; fi
.venv/bin/pip install -r requirements.txt
clean:
rm -rf output
pull:
git pull
serve:
modd
sync:
s3cmd sync --no-mime-magic --guess-mime-type --acl-public --no-preserve \
output/ s3://llimllib/${CDN_BUCKET}/
# flush the digital ocean CDN cache
flush:
doctl compute cdn flush \
$$(doctl compute cdn list --format ID | tail -n1) \
--files ${CDN_BUCKET}/*
publish: pull build sync flush
.PHONY: build build-quick clean pull requirements serve sync flush publish