minitor/Makefile

47 lines
835 B
Makefile
Raw Normal View History

2018-02-14 15:37:15 -08:00
env:
virtualenv -p python3 env
2018-04-09 10:44:30 -07:00
./env/bin/pip install -r requirements-dev.txt
2018-02-14 15:37:15 -08:00
2018-02-16 18:09:10 -08:00
.PHONY: run
2018-02-14 15:37:15 -08:00
run: env
./env/bin/python -m minitor.main
2018-02-16 18:09:10 -08:00
2018-04-09 10:44:30 -07:00
.PHONY: test
test: env
tox
2018-02-16 18:09:10 -08:00
.PHONY: build
2018-04-09 17:26:32 -07:00
build: test
2018-02-16 18:09:10 -08:00
./env/bin/python setup.py sdist
./env/bin/python setup.py bdist_wheel
.PHONY: upload
upload: env
./env/bin/twine upload dist/*
.PHONY: upload-test
upload-test: env
./env/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: clean
clean:
rm -fr ./build ./minitor.egg-info ./htmlcov ./.coverage ./.pytest_cache ./.tox
.PHONY: dist-clean
dist-clean: clean
rm -fr ./dist
2018-04-09 10:44:30 -07:00
2018-04-09 17:26:32 -07:00
.PHONY: install-hooks
2018-04-09 10:44:30 -07:00
install-hooks:
tox -e pre-commit -- install -f --install-hooks
.coverage:
tox
htmlcov/index.html: .coverage
./env/bin/coverage html
.PHONY: open-coverage
open-coverage: htmlcov/index.html
open htmlcov/index.html