wuttamess/tasks.py
2024-09-10 09:56:30 -05:00

25 lines
380 B
Python

# -*- coding: utf-8; -*-
"""
Tasks for WuttaMess
"""
import os
import shutil
from invoke import task
@task
def release(c, skip_tests=False):
"""
Release a new version of WuttaMess
"""
if not skip_tests:
c.run('pytest')
if os.path.exists('dist'):
shutil.rmtree('dist')
c.run('python -m build --sdist')
c.run('twine upload dist/*')