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
|
||||
def release(ctx, skip_tests=False):
|
||||
def release(c, tests=False):
|
||||
"""
|
||||
Release a new version of 'Tailbone'.
|
||||
"""
|
||||
if not skip_tests:
|
||||
ctx.run('tox')
|
||||
if tests:
|
||||
c.run('tox')
|
||||
|
||||
shutil.rmtree('Tailbone.egg-info')
|
||||
ctx.run('python -m build --sdist')
|
||||
ctx.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))
|
||||
if os.path.exists('Tailbone.egg-info'):
|
||||
shutil.rmtree('Tailbone.egg-info')
|
||||
c.run('python -m build --sdist')
|
||||
c.run('twine upload dist/Tailbone-{}.tar.gz'.format(__version__))
|
||||
|
|
Loading…
Reference in a new issue