-
Notifications
You must be signed in to change notification settings - Fork 77
/
Makefile
85 lines (62 loc) · 2.44 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
ifeq (, $(shell which docker-compose))
docker_compose=docker compose
else
docker_compose=docker-compose
endif
build:
docker build -t geotrek . --build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)
build-no-cache:
docker build -t geotrek --no-cache .
build_deb:
docker pull $(DISTRO)
docker build -t geotrek_deb -f ./docker/Dockerfile.debian.builder --build-arg DISTRO=$(DISTRO) .
docker run --name geotrek_deb_run -t geotrek_deb bash -c "exit"
docker cp geotrek_deb_run:/dpkg ./
docker stop geotrek_deb_run
docker rm geotrek_deb_run
serve:
$(docker_compose) up
deps:
$(docker_compose) run --rm web bash -c "pip-compile -q && pip-compile -q dev-requirements.in"
flake8:
$(docker_compose) run --rm web flake8 geotrek
messages:
$(docker_compose) run --rm web ./manage.py makemessages -a --no-location
test:
$(docker_compose) run -e ENV=tests --rm web ./manage.py test
test_nds:
$(docker_compose) run -e ENV=tests_nds --rm web ./manage.py test
test_nav:
casperjs test --baseurl=$(baseurl) geotrek/jstests/nav-*.js
test_export:
casperjs test --baseurl=$(baseurl) geotrek/jstests/nav-auth.js geotrek/jstests/export-*.js
node_modules:
npm install geotrek/jstests
test_js: node_modules
./node_modules/.bin/mocha-phantomjs geotrek/jstests/index.html
tests: test test_js test_nav
update:
$(docker_compose) run web update.sh
load_data:
$(docker_compose) run web load_data.sh
load_demo:
$(docker_compose) run web ./manage.py loaddata development-pne
load_test_integration:
$(docker_compose) run web ./manage.py loaddata test-integration
css:
for f in `find geotrek/ -name '*.scss'`; do node-sass --output-style=expanded $$f -o `dirname $$f`; done
%.pdf:
mkdir -p docs/data-model
postgresql_autodoc -h localhost -u geotrek -d geotrekdb -t dot -m "$*_.*" --password=geotrek -s "public"
dot geotrekdb.dot -T pdf -o docs/data-model/$@
rm geotrekdb.dot
authent.pdf:
mkdir -p docs/data-model
postgresql_autodoc -h localhost -u geotrek -d geotrekdb -t dot -m "auth(ent)?_.*" --password=geotrek -s "public"
dot geotrekdb.dot -T pdf -o docs/data-model/authent.pdf
rm geotrekdb.dot
global.pdf:
postgresql_autodoc -h localhost -u geotrek -d geotrekdb -t dot --password=geotrek -s "public"
dot geotrekdb.dot -T pdf -o docs/data-model/global.pdf
rm geotrekdb.dot
uml: authent.pdf cirkwi.pdf core.pdf diving.pdf feedback.pdf flatpages.pdf infrastructure.pdf land.pdf maintenance.pdf outdoor.pdf sensitivity.pdf signage.pdf tourism.pdf trekking.pdf zoning.pdf global.pdf