From 366e9c1d0b9ffcde755407a1de18e8295f6ad3a1 Mon Sep 17 00:00:00 2001 From: Rolf Erik Lekang Date: Thu, 22 Nov 2018 20:18:44 +0100 Subject: [PATCH] fix: Re-add skip-existing --- semantic_release/pypi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semantic_release/pypi.py b/semantic_release/pypi.py index 2159b0f88..19494ceb8 100644 --- a/semantic_release/pypi.py +++ b/semantic_release/pypi.py @@ -7,6 +7,7 @@ def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, + skip_existing: bool = False ): """Creates the wheel and uploads to pypi with twine. @@ -15,5 +16,5 @@ def upload_to_pypi( :param password: PyPI account password string """ run('python setup.py {}'.format(dists)) - run('twine upload -u {} -p {}'.format(username, password)) + run('twine upload -u {} -p {} {}'.format(username, password, '--skip-existing' if skip_existing else '')) run('rm -rf build dist')