2025-01-12 22:08:29 -06:00
|
|
|
# -*- 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:
|
2025-08-31 13:02:02 -05:00
|
|
|
c.run("pytest")
|
2025-01-12 22:08:29 -06:00
|
|
|
|
|
|
|
# rebuild pkg
|
2025-08-31 13:02:02 -05:00
|
|
|
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")
|
2025-01-12 22:08:29 -06:00
|
|
|
|
|
|
|
# upload
|
2025-08-31 13:02:02 -05:00
|
|
|
c.run("twine upload dist/*")
|