3
0
Fork 0
wuttaweb/tasks.py
Lance Edgar 4d0693862d fix: format all code with black
and from now on should not deviate from that...
2025-08-31 12:26:43 -05:00

28 lines
508 B
Python

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