2022-03-03 21:21:51 -06:00
|
|
|
# -*- coding: utf-8; -*-
|
|
|
|
"""
|
|
|
|
Tasks for Messkit
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
|
|
|
|
from invoke import task
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
2022-12-28 16:09:49 -06:00
|
|
|
def release(c):
|
2022-03-03 21:21:51 -06:00
|
|
|
"""
|
|
|
|
Release a new version of Messkit
|
|
|
|
"""
|
2024-06-10 21:29:46 -05:00
|
|
|
# rebuild package
|
|
|
|
if os.path.exists('dist'):
|
|
|
|
shutil.rmtree('dist')
|
2023-10-29 21:45:22 -05:00
|
|
|
if os.path.exists('Messkit.egg-info'):
|
|
|
|
shutil.rmtree('Messkit.egg-info')
|
2022-12-28 16:09:49 -06:00
|
|
|
c.run('python -m build --sdist')
|
2022-03-03 21:21:51 -06:00
|
|
|
|
|
|
|
# upload to public PyPI
|
2024-06-10 21:29:46 -05:00
|
|
|
c.run('twine upload dist/*')
|