appypod-rattail/tasks.py

24 lines
624 B
Python
Raw Permalink Normal View History

2018-10-28 13:43:02 -05:00
# -*- coding: utf-8; -*-
import os
import shutil
from invoke import task
here = os.path.abspath(os.path.dirname(__file__))
exec(open(os.path.join(here, 'appy', '_version.py')).read())
@task
def release(ctx):
"""
Release a new version of 'appypod-rattail'.
"""
shutil.rmtree('appypod_rattail.egg-info')
ctx.run('python -m build --sdist')
2018-10-28 13:43:02 -05:00
filename = 'appypod-rattail-{}.tar.gz'.format(__version__)
ctx.run('scp dist/{} rattail@pypi.rattailproject.org:/srv/pypi/public/'.format(filename))
ctx.run("ssh rattail@pypi.rattailproject.org 'cd /srv/pypi/public; rm -rf simple; compoze index'")