forked from 5monkeys/django-bananas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (38 loc) · 1.06 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
.DEFAULT_GOAL := help
.PHONY: help # shows available commands
help:
@echo "\nAvailable commands:\n\n $(shell sed -n 's/^.PHONY:\(.*\)/ *\1\\n/p' Makefile)"
.PHONY: test # runs tests
test:
coverage run setup.py test
.PHONY: test_all # runs tests using detox, combines coverage and reports it
test_all:
detox
make coverage
.PHONY: coverage # combines coverage and reports it
coverage:
coverage combine || true
coverage report
.PHONY: lint # runs flake8
lint:
@flake8 bananas && echo "OK"
.PHONY: install
install:
python setup.py install
.PHONY: develop
develop:
python setup.py develop
.PHONY: example # starts exmpale app using docker
example:
@docker-compose up -d --build --force-recreate
@rm -rf example/db.sqlite3
@docker-compose run --rm django1 migrate --no-input
@docker-compose run --rm django1 createsuperuser \
--username admin \
--email [email protected]
@docker-compose ps
.PHONY: clean
clean:
@rm -rf dist/ *.egg *.egg-info .coverage .coverage.* example/db.sqlite3
.PHONY: all # runs clean, test_all, lint
all: clean test_all lint