From 44d012b3fd8127164b374d723be7b6ccd62dca33 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 19 Oct 2018 20:31:49 -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 09eca73..24f3876 100644 --- a/tasks.py +++ b/tasks.py @@ -26,15 +26,21 @@ Tasks for 'rattail-tempmon' package 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, 'rattail_tempmon', '_version.py')).read()) + + @task def release(ctx): """ Release a new version of `rattail-tempmon` """ shutil.rmtree('rattail_tempmon.egg-info') - ctx.run('python setup.py sdist --formats=gztar upload') + ctx.run('python setup.py sdist --formats=gztar') + ctx.run('twine upload dist/rattail-tempmon-{}.tar.gz'.format(__version__))