-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (34 loc) · 1.04 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
# ------
# Common
# ------
$(eval venvpath := .venv_util)
$(eval pip := $(venvpath)/bin/pip)
$(eval python := $(venvpath)/bin/python)
$(eval bumpversion := $(venvpath)/bin/bumpversion)
$(eval twine := $(venvpath)/bin/twine)
$(eval sphinx := $(venvpath)/bin/sphinx-build)
setup-virtualenv:
@test -e $(python) || `command -v virtualenv` --python=`command -v python` --no-site-packages $(venvpath)
# -------
# Release
# -------
setup-release: setup-virtualenv
$(pip) install --quiet --requirement requirements-release.txt
bumpversion:
$(bumpversion) $(bump)
push:
git push && git push --tags
sdist:
$(python) setup.py sdist
upload:
$(twine) upload --skip-existing dist/*.tar.gz
# make release bump=minor (major,minor,patch)
release: setup-release bumpversion push sdist upload
# -------------
# Documentation
# -------------
setup-docs: setup-virtualenv
$(pip) install --quiet --requirement requirements-docs.txt
docs-html: setup-docs
touch docs/index.rst
export SPHINXBUILD="`pwd`/$(sphinx)"; cd docs; make html