-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (75 loc) · 1.81 KB
/
Makefile
File metadata and controls
95 lines (75 loc) · 1.81 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
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
86
87
88
89
90
91
92
93
94
95
ifeq (, $(ENV))
ENV := development
env := development
else ifeq (test, $(ENV))
env := testing
else
env := $(ENV)
endif
ifeq (, $(NODE_ENV))
NODE_ENV := development
endif
app := willisau
# -- installation
setup:
pip install -e '.[${env}]' -c constraints.txt
.PHONY: setup
setup-force:
pip install --upgrade --force-reinstall -e '.[${env}]' -c constraints.txt
.PHONY: setup-force
update:
pip install --upgrade -e '.[${env}]' -c constraints.txt
.PHONY: update
# -- application
serve:
./bin/serve --env development --config config/development.ini --reload
.PHONY: serve
# -- testing
test:
ENV=test py.test -c 'config/testing.ini' -s -q
.PHONY: test
coverage:
ENV=test py.test -c 'config/testing.ini' -s -q --cov=${app} --cov-report \
term-missing:skip-covered
.PHONY: coverage
# -- utility
check:
flake8
.PHONY: check
lint:
pylint test ${app}
.PHONY: lint
vet: | check lint
.PHONY: vet
analyze:
docker run --interactive --tty --rm --env CODECLIMATE_CODE="${PWD}" \
--volume "${PWD}":/code \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /tmp/cc:/tmp/cc \
codeclimate/codeclimate analyze -f text > tmp/codequality.txt
cat tmp/codequality.txt
.PHONY: analyze
build:
ifeq (, $(shell which gulp 2>/dev/null))
$(info gulp command not found. run `npm install -g gulp-cli`)
$(info )
else
NODE_ENV=$(NODE_ENV) gulp
endif
.PHONY: build
clean:
find . ! -readable -prune -o -print \
! -path "./.git/*" ! -path "./node_modules/*" ! -path "./venv*" \
! -path "./doc/*" ! -path "./locale/*" ! -path "./tmp/*" \
! -path "./lib/*" | \
grep -E "(__pycache__|\.egg-info|\.pyc|\.pyo)" | \
xargs rm -rf
ifeq (, $(shell which gulp 2>/dev/null))
$(info gulp command not found. run `npm install -g gulp-cli`)
$(info )
else
gulp clean
endif
.PHONY: clean
.DEFAULT_GOAL = coverage
default: coverage