Debian Codegraph @

Makefile

raw
1 OK_COLOR=\033[32;01m
2 NO_COLOR=\033[0m
3
4 all: lint unit
5
6 export PYTHONPATH:=${PWD}
7 version=`python -c 'import jsonpath_ng; print(jsonpath_ng.__version__)'`
8 filename=jsonpath_ng-`python -c 'import jsonpath_ng; print(jsonpath_ng.__version__)'`.tar.gz
9
10 apidocs:
11 @sphinx-apidoc -f --follow-links -H "API documentation" -o docs/source jsonpath_ng
12
13 htmldocs:
14 @rm -rf docs/_build
15 $(MAKE) -C docs html
16
17 install:
18 @pip install -r requirements.txt
19 @pip install -r requirements-dev.txt
20
21 lint:
22 @echo "$(OK_COLOR)==> Linting code ...$(NO_COLOR)"
23 @flake8 --exclude=tests .
24
25 test: clean
26 @echo "$(OK_COLOR)==> Running tests ...$(NO_COLOR)"
27 @tox
28
29 tag:
30 @echo "$(OK_COLOR)==> Creating tag $(version) ...$(NO_COLOR)"
31 @git tag -a "v$(version)" -m "Version $(version)"
32 @echo "$(OK_COLOR)==> Pushing tag $(version) to origin ...$(NO_COLOR)"
33 @git push origin "v$(version)"
34
35 bump:
36 @bumpversion --commit --tag --current-version $(version) patch jsonpath_ng/__init__.py --allow-dirty
37
38 bump-minor:
39 @bumpversion --commit --tag --current-version $(version) minor jsonpath_ng/__init__.py --allow-dirty
40
41 history:
42 @git changelog --tag $(version)
43
44 clean:
45 @echo "$(OK_COLOR)==> Cleaning up files that are already in .gitignore...$(NO_COLOR)"
46 @git clean -Xf
47
48 publish:
49 @echo "$(OK_COLOR)==> Releasing package ...$(NO_COLOR)"
50 @python setup.py sdist bdist_wheel
51 @twine upload dist/*
52 @rm -fr build dist .egg pook.egg-info