Skip to content

Commit

Permalink
fix: Add check of credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
relekang committed Nov 22, 2018
1 parent 1cec2df commit 7d945d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions semantic_release/pypi.py
Expand Up @@ -2,6 +2,8 @@
"""
from invoke import run

from semantic_release import ImproperConfigurationError


def upload_to_pypi(
dists: str = 'sdist bdist_wheel',
Expand All @@ -15,6 +17,8 @@ def upload_to_pypi(
:param username: PyPI account username string
:param password: PyPI account password string
"""
if username is None or password is None:
raise ImproperConfigurationError('Missing credentials for uploading')
run('python setup.py {}'.format(dists))
run(
'twine upload -u {} -p {} {} {}'.format(
Expand Down

0 comments on commit 7d945d4

Please sign in to comment.