forked from Spacelog/Spacelog
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
70 lines (52 loc) · 2.18 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
indexer = backend/indexer.py
website_screen_css = website/static/css/screen.css
website_screen_sass = website/static/css/screen.scss
website_screen_sass_components = website/static/css/screen/*.scss
global_screen_css = global/static/css/screen.css
global_screen_sass = global/static/css/screen.scss
global_screen_sass_components = global/static/css/*.scss
PYTHON ?= ./ENV/bin/python
# Dev Django runserver variables
dev_webserver_ip ?= 0.0.0.0
dev_webserver_port ?= 8000
dev_global_port ?= 8001
all: reindex collectstatic
dirty: copyxapian productioncss copy_statsporn
collectstatic: productioncss statsporn
$(PYTHON) -m website.manage collectstatic --noinput --ignore=*.scss
$(PYTHON) -m global.manage collectstatic --noinput --ignore=*.scss
reindex: $(indexer)
rm -rf xappydb
$(PYTHON) -m backend.indexer
# backwards compatibility
build_statsporn: statsporn
statsporn:
$(PYTHON) -m backend.stats_porn
copy_statsporn:
$(foreach d, $(wildcard ../current/missions/*/images/stats), cp -a $d `echo $d | sed 's#../current/##'`;)
productioncss: $(website_screen_css) $(global_screen_css)
# only use this in production, it'll explode entertainingly otherwhere
copyxapian:
cp -a ../current/xappydb xappydb
$(website_screen_css): $(website_screen_sass) $(website_screen_sass_components)
sass --style compressed \
$(website_screen_sass) > $(website_screen_css)
$(global_screen_css): $(global_screen_sass) $(global_screen_sass_components)
sass --style compressed \
$(global_screen_sass) > $(global_screen_css)
devserver:
$(PYTHON) -m website.manage runserver $(dev_webserver_ip):$(dev_webserver_port)
devcss:
sass --style compressed --watch $(website_screen_sass):$(website_screen_css)
devserver_global:
$(PYTHON) -m global.manage runserver $(dev_webserver_ip):$(dev_global_port)
devcss_global:
sass --style compressed --watch $(global_screen_sass):$(global_screen_css)
thumbnails:
cd website/static/img/missions/a13/; $(PYTHON) resize.py
# assume there's no artemis screen session already, and just make one from scratch
screen:
screen -dmS artemis
sleep 1
screen -r artemis -X source screenstart
screen -r artemis