2014-12-15 21:11:00 +00:00
|
|
|
|
2014-12-17 09:54:58 +00:00
|
|
|
PYTHON=python
|
2014-12-18 22:16:13 +00:00
|
|
|
VERSION=`cut -d "'" -f 2 alerta/version.py`
|
2014-12-15 21:11:00 +00:00
|
|
|
|
2014-12-15 16:40:15 +00:00
|
|
|
all: help
|
2013-02-17 10:55:54 +00:00
|
|
|
|
|
|
|
help:
|
2014-12-15 16:40:15 +00:00
|
|
|
@echo ""
|
|
|
|
@echo "Usage: make <command>"
|
|
|
|
@echo ""
|
|
|
|
@echo "Commands:"
|
|
|
|
@echo " init Initialise environment"
|
|
|
|
@echo " pylint Lint source code"
|
2017-09-01 22:22:59 +00:00
|
|
|
@echo " clean Clean source"
|
2014-12-15 16:40:15 +00:00
|
|
|
@echo " test Run tests"
|
2017-09-01 22:22:59 +00:00
|
|
|
@echo " run Run application"
|
|
|
|
@echo " tag Git tag with current version"
|
|
|
|
@echo " upload Upload package to PyPI"
|
2014-12-15 16:40:15 +00:00
|
|
|
@echo ""
|
2013-02-17 10:55:54 +00:00
|
|
|
|
|
|
|
init:
|
2014-12-15 16:40:15 +00:00
|
|
|
pip install -r requirements.txt
|
2013-02-17 10:55:54 +00:00
|
|
|
|
|
|
|
pylint:
|
2014-12-15 16:40:15 +00:00
|
|
|
@pip -q install pylint
|
|
|
|
pylint --rcfile pylintrc alerta
|
2013-02-17 10:55:54 +00:00
|
|
|
|
2015-03-19 15:27:11 +00:00
|
|
|
clean:
|
|
|
|
find . -name "*.pyc" -exec rm {} \;
|
|
|
|
rm -Rf build dist *.egg-info
|
|
|
|
|
2013-02-17 10:55:54 +00:00
|
|
|
test:
|
2017-09-01 22:22:59 +00:00
|
|
|
ALERTA_SVR_CONF_FILE= nosetests tests
|
2014-12-15 21:11:00 +00:00
|
|
|
|
|
|
|
run:
|
2017-09-01 22:22:59 +00:00
|
|
|
alertad run --with-threads
|
2014-12-15 21:11:00 +00:00
|
|
|
|
2017-09-01 22:22:59 +00:00
|
|
|
tag:
|
2014-12-17 09:54:58 +00:00
|
|
|
git tag -a v$(VERSION) -m "version $(VERSION)"
|
2017-10-22 08:31:54 +00:00
|
|
|
git push --tags
|
2014-12-17 09:54:58 +00:00
|
|
|
|
2014-12-15 21:11:00 +00:00
|
|
|
upload:
|
2017-09-27 20:15:56 +00:00
|
|
|
$(PYTHON) setup.py sdist bdist_wheel upload
|