From 67e7ba023acefa3fb3220931681da9ca9ed7f631 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 18 Oct 2018 23:36:08 -0500 Subject: [PATCH] Update `release` task to use twine for upload --- tasks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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__))