forked from alerta/alerta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (46 loc) · 1.11 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
PYTHON=python
VERSION=`cut -d "'" -f 2 alerta/version.py`
all: help
help:
@echo ""
@echo "Usage: make <command>"
@echo ""
@echo "Commands:"
@echo " init Initialise environment"
@echo " dev Initialise dev environment"
@echo " pylint Lint source code"
@echo " mypy Type checking"
@echo " clean Clean source"
@echo " test Run tests"
@echo " run Run application"
@echo " tag Git tag with current version"
@echo " upload Upload package to PyPI"
@echo ""
init:
pip install -r requirements.txt --upgrade
pip install -e .
dev:
pip install -r requirements-dev.txt --upgrade
pre-commit install
pre-commit autoupdate
pylint:
@pip -q install pylint
pylint --rcfile pylintrc alerta
mypy:
@pip -q install mypy==0.620
mypy alerta/
hooks:
pre-commit run --all-files
clean:
find . -name "*.pyc" -exec rm {} \;
rm -Rf build dist *.egg-info
test:
ALERTA_SVR_CONF_FILE= nosetests tests
run:
alertad run --port 8080 --with-threads --reload
tag:
git tag -a v$(VERSION) -m "version $(VERSION)"
git push --tags
upload:
$(PYTHON) setup.py sdist bdist_wheel
twine upload dist/*