-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
58 lines (42 loc) · 1.08 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
.PHONY: run clean requirements env config install pylint jslint lint shell db deploy log test
root_path="/opt/eyebrowse"
env_path="$(ROOT_PATH)/env"
debug_path="$(ROOT_PATH)/debug"
log_path="/var/opt/eyebrowse/logs/"
ifndef env
env=dev
endif
ifndef debug
debug=true
endif
shell:
python manage.py shell
run:
python manage.py runserver
clean:
find . -type f -name '*.py[cod]' -delete
find . -type f -name '*.*~' -delete
requirements:
pip install -r requirements.txt
log:
sudo mkdir -p $(log_path)
sudo touch $(log_path)/eyebrowse.log
env:
sudo mkdir -p $(root_path)
echo $(env) | sudo tee $(env_path) > /dev/null
echo $(debug) | sudo tee $(debug_path) > /dev/null
config:
mv config.py config.py-bak 2>/dev/null # save a copy just in case
cp config_template.py config.py
git checkout config_template.py # reset the template
db:
python manage.py syncdb
python manage.py migrate
install: clean requirements env log config db
pylint:
-flake8 .
jslint:
-jshint -c .jshintrc --exclude-path .jshintignore .
lint: clean pylint jslint
deploy: lint
fab prod deploy restart_apache