Changeset 68a17f6 in rattail


Ignore:
Timestamp:
07/18/2022 12:39:46 PM (7 months ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
f818af8
Parents:
331a31b
Message:

Only remove egg-info dir if it exists, when releasing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tasks.py

    r331a31b r68a17f6  
    3838
    3939@task
    40 def release(ctx, skip_tests=False):
     40def release(c, skip_tests=False):
    4141    """
    4242    Release a new version of `rattail`.
    4343    """
    4444    if not skip_tests:
    45         ctx.run('tox')
    46     shutil.rmtree('rattail.egg-info')
    47     ctx.run('python -m build --sdist')
    48     ctx.run('twine upload dist/rattail-{}.tar.gz'.format(__version__))
     45        c.run('tox')
     46
     47    if os.path.exists('rattail.egg-info'):
     48        shutil.rmtree('rattail.egg-info')
     49
     50    c.run('python -m build --sdist')
     51    c.run('twine upload dist/rattail-{}.tar.gz'.format(__version__))
Note: See TracChangeset for help on using the changeset viewer.