build: add release task
This commit is contained in:
parent
3da2b5db72
commit
8e78cd3253
24
tasks.py
Normal file
24
tasks.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""
|
||||
Tasks for Wutta-Continuum
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from invoke import task
|
||||
|
||||
|
||||
@task
|
||||
def release(c, skip_tests=False):
|
||||
"""
|
||||
Release a new version of Wutta-Continuum
|
||||
"""
|
||||
if not skip_tests:
|
||||
c.run('pytest')
|
||||
|
||||
if os.path.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
|
||||
c.run('python -m build --sdist')
|
||||
c.run('twine upload dist/*')
|
Loading…
Reference in a new issue