forked from feedreader/pluto.starter
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 1.06 KB
/
Makefile
File metadata and controls
38 lines (29 loc) · 1.06 KB
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
38
.DEFAULT_GOAL := update
.PHONY: build css check page prepare update upgrade
prepare:
bundle install --path vendor/bundle
check:
bundle exec pluto help
upgrade:
git pull
fetch:
python3 fetch-feeds -o build
# sometime it fails but works the next time
bundle exec pluto update planet.ini \
|| bundle exec pluto update planet.ini
css:
# it looks like pluto does not call sass itself
mkdir -p build/css
sassc planet-devfeeds/css/page.scss build/css/page.css
sassc planet-devfeeds/css/news.scss build/css/news.css
sassc planet-devfeeds/css/github.scss build/css/github.css
sassc planet-devfeeds/css/gitlab.scss build/css/gitlab.css
page:
# it automatically finds planet-devfeeds/news.txt
bundle exec pluto merge -t news -o build planet.ini
# file was rendered to a temporary file because there can be some race condition
# between pluto rendering this page and people querying the page from server
# hence we copy the page when it's ready, which is fast (uses CoW if possible)
cp -a --reflink=auto build/news.html build/index.html
build: css page
update: fetch build