Only run tests if requested, for release task
This commit is contained in:
parent
bcedc58d9f
commit
2dbba970b9
13
tasks.py
13
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')
|
||||||
|
|
||||||
shutil.rmtree('Tailbone.egg-info')
|
if os.path.exists('Tailbone.egg-info'):
|
||||||
ctx.run('python -m build --sdist')
|
shutil.rmtree('Tailbone.egg-info')
|
||||||
ctx.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))
|
c.run('python -m build --sdist')
|
||||||
|
c.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))
|
||||||
|
|
Loading…
Reference in a new issue