sideshow-corepos/tasks.py
Lance Edgar a0b36a6384 fix: format all code with black
and from now on should not deviate from that...
2025-08-31 13:02:02 -05:00

28 lines
528 B
Python

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