-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
47 lines (35 loc) · 994 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
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: lint test clean clean-dist bump release
VENV = .venv
VENV_ACTIVATE = . $(VENV)/bin/activate
BUMPTYPE = patch
PWD = $(shell pwd)
TOX = tox
$(VENV):
virtualenv $(VENV)
$(VENV_ACTIVATE); pip install -r dev-requirements.txt
$(VENV_ACTIVATE); pip install -e .
lint: $(VENV)
$(VENV_ACTIVATE); tox -e flake8
test: $(VENV) lint
$(VENV_ACTIVATE); pytest -v -n auto tests/test.py
dist: clean-dist $(VENV)
python setup.py sdist
ls -ls dist
tar tzf dist/*
$(VENV_ACTIVATE); twine check dist/*
bump: $(VENV)
$(VENV_ACTIVATE); bumpversion $(BUMPTYPE)
git show -q
@echo
@echo "SUCCESS: Version was bumped and committed. Now push the commit."
@echo
@echo " git push origin master && git push --tags"
test-release: clean test dist
$(VENV_ACTIVATE); twine upload --repository-url https://test.pypi.org/legacy/ dist/*
release: clean test dist
$(VENV_ACTIVATE); twine upload dist/*
clean-dist:
rm -rf dist
rm -rf tox_pip_version.egg-info
clean: clean-dist
rm -rf $(VENV)