diff --git a/tasks.py b/tasks.py index c9f5c4a2..e2ba5670 100644 --- a/tasks.py +++ b/tasks.py @@ -26,11 +26,16 @@ Tasks for Tailbone from __future__ import unicode_literals, absolute_import +import os import shutil from invoke import task +here = os.path.abspath(os.path.dirname(__file__)) +exec(open(os.path.join(here, 'tailbone', '_version.py')).read()) + + @task def release(ctx, skip_tests=False): """ @@ -40,4 +45,5 @@ def release(ctx, skip_tests=False): ctx.run('tox') shutil.rmtree('Tailbone.egg-info') - ctx.run('python setup.py sdist --formats=gztar upload') + ctx.run('python setup.py sdist --formats=gztar') + ctx.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))