2024-07-12 00:17:15 -05:00
|
|
|
# -*- 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:
|
2024-07-14 11:10:54 -05:00
|
|
|
c.run('pytest')
|
2024-07-12 00:17:15 -05:00
|
|
|
|
|
|
|
# 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/*')
|