2020-12-02 22:18:22 -06:00
|
|
|
# -*- coding: utf-8; -*-
|
|
|
|
"""
|
|
|
|
Tasks for Corporal
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
|
|
|
|
from invoke import task
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
2024-06-10 19:57:20 -05:00
|
|
|
def release(c):
|
2020-12-02 22:18:22 -06:00
|
|
|
"""
|
|
|
|
Release a new version of Corporal
|
|
|
|
"""
|
2024-06-10 19:57:20 -05:00
|
|
|
# rebuild package
|
|
|
|
if os.path.exists('dist'):
|
|
|
|
shutil.rmtree('dist')
|
|
|
|
if os.path.exists('Corporal.egg-info'):
|
|
|
|
shutil.rmtree('Corporal.egg-info')
|
|
|
|
c.run('python -m build --sdist')
|
2020-12-02 22:18:22 -06:00
|
|
|
|
2021-06-11 17:47:16 -05:00
|
|
|
# upload to public PyPI
|
2024-06-10 19:57:20 -05:00
|
|
|
c.run('twine upload dist/*')
|