This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (45 loc) · 1.89 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
PYTHON_SITE_PACKAGES_PATH := \
$(shell python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
help:
@echo "TODO: Write the install help"
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
install:
@echo "Attempting to create GAE local datastore directory"
[ -d ./data ] && echo "FYI: Dir Exists" || mkdir ./data
pip install -Ur requirements_dev.txt
pip install -Ur requirements.txt -t app/external
@echo "Requirements installed."
unit:
ifeq ($(filter-out $@,$(MAKECMDGOALS)), "")
@echo "Running all unit tests"
else
@echo "Running only tests in $(filter-out $@,$(MAKECMDGOALS))"
endif
nosetests -sv -a is_unit --with-gae --gae-application=app --gae-lib-root=$(GAE_PYTHONPATH) --with-yanc --logging-level=ERROR $(filter-out $@,$(MAKECMDGOALS))
integrations:
ifeq ($(filter-out $@,$(MAKECMDGOALS)), "")
@echo "Running all integration tests"
else
@echo "Running only integration tests in $(filter-out $@,$(MAKECMDGOALS))"
endif
nosetests -sv --with-gae --gae-application=app --with-yanc $(filter-out $@,$(MAKECMDGOALS))
coverage:
ifeq ($(filter-out $@,$(MAKECMDGOALS)), "")
@echo "Generating coverage for all unit tests"
else
@echo "Generating coverage only for tests in $(filter-out $@,$(MAKECMDGOALS))"
endif
nosetests -sv --with-gae --gae-application=app --with-yanc --with-coverage --cover-package=app --cover-erase --cover-html $(filter-out $@,$(MAKECMDGOALS))
run:
dev_appserver.py app --storage_path=./data/.search --datastore_path=./data/.datastore --enable_sendmail --port=9090
#dispatch:
# appcfg.py -A arts-612 update_dispatch .
deploy:
appcfg.py update -A pref-service-dev -V $(filter-out $@,$(MAKECMDGOALS)) ./app/app.yaml
deploy_prod:
appcfg.py update -A pref-service -V $(filter-out $@,$(MAKECMDGOALS)) ./app/app.yaml
# Update indexes
# appcfg.py update_indexes -A pref-service ./app