-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (27 loc) · 794 Bytes
/
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
VERSION=$(shell python -c "import ratpmetro; print(ratpmetro.__version__)")
default:
@echo "\"make publish\"?"
# https://packaging.python.org/distributing/#id72
upload: setup.py
# Make sure we're on the master branch
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
rm -f dist/*
python setup.py sdist
python setup.py bdist_wheel
python -m twine upload dist/*
tag:
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
@echo "Tagging v$(VERSION)..."
git tag v$(VERSION)
git push --tags
publish: tag upload
clean:
@find . | grep -E "(__pycache__|\.pyc|\.pyo$\)" | xargs rm -rf
@rm -rf *.egg-info/ build/ dist/ MANIFEST .pytest_cache/
format:
isort -rc .
black .
check:
isort --check -rc .
black --check .
flake8 .