27 lines
516 B
Python
27 lines
516 B
Python
# -*- coding: utf-8; -*-
|
|
"""
|
|
Tasks for Messkit
|
|
"""
|
|
|
|
import os
|
|
import shutil
|
|
|
|
from invoke import task
|
|
|
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
exec(open(os.path.join(here, 'messkit', '_version.py')).read())
|
|
|
|
|
|
@task
|
|
def release(c):
|
|
"""
|
|
Release a new version of Messkit
|
|
"""
|
|
# rebuild local tar.gz file for distribution
|
|
shutil.rmtree('Messkit.egg-info')
|
|
c.run('python -m build --sdist')
|
|
|
|
# upload to public PyPI
|
|
c.run('twine upload dist/Messkit-{}.tar.gz'.format(__version__))
|