Only run tests if requested, for release task
This commit is contained in:
parent
bcedc58d9f
commit
2dbba970b9
11
tasks.py
11
tasks.py
|
@ -37,13 +37,14 @@ exec(open(os.path.join(here, 'tailbone', '_version.py')).read())
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def release(ctx, skip_tests=False):
|
def release(c, tests=False):
|
||||||
"""
|
"""
|
||||||
Release a new version of 'Tailbone'.
|
Release a new version of 'Tailbone'.
|
||||||
"""
|
"""
|
||||||
if not skip_tests:
|
if tests:
|
||||||
ctx.run('tox')
|
c.run('tox')
|
||||||
|
|
||||||
|
if os.path.exists('Tailbone.egg-info'):
|
||||||
shutil.rmtree('Tailbone.egg-info')
|
shutil.rmtree('Tailbone.egg-info')
|
||||||
ctx.run('python -m build --sdist')
|
c.run('python -m build --sdist')
|
||||||
ctx.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))
|
c.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))
|
||||||
|
|
Loading…
Reference in a new issue