Avoid error when re-running release task
This commit is contained in:
parent
acfc7f7d80
commit
f7f60eff85
13
tasks.py
13
tasks.py
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2022 Lance Edgar
|
# Copyright © 2010-2023 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -24,8 +24,6 @@
|
||||||
Tasks for 'rattail-tempmon' package
|
Tasks for 'rattail-tempmon' package
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
@ -37,10 +35,11 @@ exec(open(os.path.join(here, 'rattail_tempmon', '_version.py')).read())
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def release(ctx):
|
def release(c):
|
||||||
"""
|
"""
|
||||||
Release a new version of `rattail-tempmon`
|
Release a new version of `rattail-tempmon`
|
||||||
"""
|
"""
|
||||||
shutil.rmtree('rattail_tempmon.egg-info')
|
if os.path.exists('rattail_tempmon.egg-info'):
|
||||||
ctx.run('python -m build --sdist')
|
shutil.rmtree('rattail_tempmon.egg-info')
|
||||||
ctx.run('twine upload dist/rattail-tempmon-{}.tar.gz'.format(__version__))
|
c.run('python -m build --sdist')
|
||||||
|
c.run('twine upload dist/rattail-tempmon-{}.tar.gz'.format(__version__))
|
||||||
|
|
Loading…
Reference in a new issue