Update release task to use twine for upload

This commit is contained in:
Lance Edgar 2018-10-19 20:31:49 -05:00
parent 157873dc16
commit 44d012b3fd

View file

@ -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__))