File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- .PHONY : test install clean clean-build clean-pyc build
1+ .PHONY : test publish install clean clean-build clean-pyc clean-test build
22
33install :
44 python setup.py install
@@ -20,6 +20,27 @@ clean-pyc:
2020 find . -name ' *~' -exec rm -f {} +
2121 find . -name ' __pycache__' -exec rm -fr {} +
2222
23+ clean-test :
24+ rm -f .coverage
25+
26+ test :
27+ py.test -s --cov=sqlalchemy_opentracing
28+
2329build :
2430 python setup.py build
2531
32+ publish : test build
33+ @git diff-index --quiet HEAD || (echo " git has uncommitted changes. Refusing to publish." && false)
34+ awk ' BEGIN { FS = "." }; { printf("%d.%d.%d", $$1, $$2, $$3+1) }' VERSION > VERSION.incr
35+ mv VERSION.incr VERSION
36+ git add VERSION
37+ git commit -m " Update VERSION"
38+ git tag ` cat VERSION`
39+ git push
40+ git push --tags
41+ python setup.py register -r pypi || (echo " Was unable to register to pypi, aborting publish." && false)
42+ python setup.py sdist upload -r pypi || (echo " Was unable to upload to pypi, publish failed." && false)
43+ @echo
44+ @echo " \033[92mSUCCESS: published v` cat VERSION` \033[0m"
45+ @echo
46+
You can’t perform that action at this time.
0 commit comments