26 lines
445 B
Python
26 lines
445 B
Python
# -*- coding: utf-8; -*-
|
|
"""
|
|
Tasks for Messkit
|
|
"""
|
|
|
|
import os
|
|
import shutil
|
|
|
|
from invoke import task
|
|
|
|
|
|
@task
|
|
def release(c):
|
|
"""
|
|
Release a new version of Messkit
|
|
"""
|
|
# rebuild package
|
|
if os.path.exists('dist'):
|
|
shutil.rmtree('dist')
|
|
if os.path.exists('Messkit.egg-info'):
|
|
shutil.rmtree('Messkit.egg-info')
|
|
c.run('python -m build --sdist')
|
|
|
|
# upload to public PyPI
|
|
c.run('twine upload dist/*')
|