Convert fabfile to tasks.py for invoke

This commit is contained in:
Lance Edgar 2019-01-21 17:29:34 -06:00
parent 59ee5fa02a
commit 34c5762b55

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2017 Lance Edgar # Copyright © 2010-2019 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -20,16 +20,27 @@
# Rattail. If not, see <http://www.gnu.org/licenses/>. # Rattail. If not, see <http://www.gnu.org/licenses/>.
# #
################################################################################ ################################################################################
"""
Tasks for rattail-cognitive
"""
from __future__ import unicode_literals, absolute_import
import os
import shutil 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 @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') 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__))