sideshow/tasks.py

29 lines
496 B
Python
Raw Permalink Normal View History

2025-01-06 17:35:31 -06:00
# -*- coding: utf-8; -*-
"""
Tasks for Sideshow
"""
import os
import shutil
from invoke import task
@task
def release(c, skip_tests=False):
"""
Release a new version of Sideshow
"""
if not skip_tests:
c.run('pytest')
# rebuild pkg
if os.path.exists('dist'):
shutil.rmtree('dist')
if os.path.exists('Sideshow.egg-info'):
shutil.rmtree('Sideshow.egg-info')
c.run('python -m build --sdist')
# upload
c.run('twine upload dist/*')