-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 1.14 KB
/
Makefile
File metadata and controls
38 lines (28 loc) · 1.14 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
include ../includes.mk
COMPONENT = controller
IMAGE = $(IMAGE_PREFIX)$(COMPONENT):$(BUILD_TAG)
SHELL_SCRIPTS = $(wildcard bin/*) $(shell find "." -name '*.sh')
build: check-docker
docker build -t $(IMAGE) .
clean: check-docker
docker rmi $(IMAGE)
full-clean: check-docker
docker images -q $(IMAGE_PREFIX)$(COMPONENT) | xargs docker rmi -f
postgres:
docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.3
docker exec postgres createdb -U postgres deis 2>/dev/null || true
@echo "To use postgres for local development:"
@echo " export PGHOST=`docker-machine ip $$(docker-machine active) 2>/dev/null || echo 127.0.0.1`"
@echo " export PGPORT=5432"
@echo " export PGUSER=postgres"
setup-venv:
@if [ ! -d venv ]; then virtualenv venv; fi
venv/bin/pip install --disable-pip-version-check -q -r requirements.txt -r dev_requirements.txt
test: test-style test-unit
test-style:
flake8 --show-pep8 --show-source
shellcheck $(SHELL_SCRIPTS)
test-unit:
coverage run manage.py test --noinput web registry api
coverage report -m
.PHONY: build clean full-clean postgres setup-venv test test-style test-unit