-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
42 lines (32 loc) · 1.03 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
.PHONY: fail-if-no-virtualenv all install lint black test debug undebug
all: install assets
fail-if-no-virtualenv:
ifndef VIRTUAL_ENV # check for a virtualenv in development environment
ifndef PYENVPIPELINE_VIRTUALENV # check for jenkins pipeline virtualenv
$(error this makefile needs a virtualenv)
endif
endif
ifndef PIP_INDEX_URL
PIP_INDEX_URL=https://pypi.uwkm.nl/ocyan/testing/+simple/
endif
install: fail-if-no-virtualenv
PIP_INDEX_URL=${PIP_INDEX_URL} pip install --editable .[test] --upgrade --upgrade-strategy=eager --pre
assets:
npm install
npm run build
lint: fail-if-no-virtualenv
@black --check --exclude "migrations/*" rr
@pylint setup.py rr/
npm run lint
black:
@black --exclude "migrations/*" rr
test: fail-if-no-virtualenv
@coverage run --source='rr' `which manage.py` test
@coverage report
@coverage xml
@coverage html
npm audit --omit dev
debug: fail-if-no-virtualenv
PIP_INDEX_URL=${PIP_INDEX_URL} pip install --pre ocyan.plugin.debug
undebug:
PIP_INDEX_URL=${PIP_INDEX_URL} pip uninstall -y ocyan.plugin.debug