diff --git a/fabfile.py b/tasks.py similarity index 67% rename from fabfile.py rename to tasks.py index 9693f81..b7945f5 100644 --- a/fabfile.py +++ b/tasks.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2019 Lance Edgar # # This file is part of Rattail. # @@ -20,16 +20,27 @@ # Rattail. If not, see . # ################################################################################ +""" +Tasks for rattail-cognitive +""" +from __future__ import unicode_literals, absolute_import + +import os import shutil -from fabric.api import * +from invoke import task + + +here = os.path.abspath(os.path.dirname(__file__)) +exec(open(os.path.join(here, 'rattail_cognitive', '_version.py')).read()) @task -def release(): +def release(ctx): """ - Release a new version of 'rattail_cognitive'. + Release a new version of `rattail`. """ shutil.rmtree('rattail_cognitive.egg-info') - local('python setup.py sdist --formats=gztar upload') + ctx.run('python setup.py sdist --formats=gztar') + ctx.run('twine upload dist/rattail_cognitive-{}.tar.gz'.format(__version__))