Bump version and changelog for release
[osm/N2VC.git] / Makefile
1 BIN := .tox/py35/bin
2 PY := $(BIN)/python3.5
3 PIP := $(BIN)/pip
4 SCHEMAGEN := $(shell which schemagen)
5 VERSION=$(shell cat VERSION)
6
7 clean:
8 find . -name __pycache__ -type d -exec rm -r {} +
9 find . -name *.pyc -delete
10 rm -rf .tox
11
12 .tox:
13 tox -r --notest
14
15 client:
16 ifndef SCHEMAGEN
17 $(error "schemagen is not available, please install from https://github.com/juju/schemagen")
18 endif
19 $(PY) -m juju.client.facade -s "juju/client/schemas*" -o juju/client/
20
21 test:
22 tox
23
24 docs: .tox
25 $(PIP) install -r docs/requirements.txt
26 rm -rf docs/api/* docs/_build/
27 $(BIN)/sphinx-apidoc -o docs/api/ juju/
28 $(BIN)/sphinx-build -b html docs/ docs/_build/
29 cd docs/_build/ && zip -r docs.zip *
30
31 release: docs
32 git remote | xargs -L1 git fetch --tags
33 $(PY) setup.py sdist upload
34 git tag ${VERSION}
35 git remote | xargs -L1 git push --tags
36 @echo "Please manually upload docs/_build/docs.zip via the PyPI website"
37
38 upload: release
39
40
41 .PHONY: clean client test docs upload release