Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: fix release-pypi #399

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions reana/reana_dev/release.py
Expand Up @@ -8,6 +8,7 @@

"""`reana-dev`'s release commands."""

import os
import sys
from time import sleep

Expand Down Expand Up @@ -181,6 +182,12 @@ def release_pypi(ctx, component, timeout): # noqa: D301
:type component: str
"""
components = select_components(component)
username, password = os.getenv("TWINE_USERNAME"), os.getenv("TWINE_PASSWORD")
if not (username and password):
click.secho(
"Please set TWINE_USERNAME and TWINE_PASSWORD to release on PyPI.", fg="red"
)
sys.exit(1)
for component in components:
is_component_releasable(component, exit_code=True, display=True)
ctx.invoke(git_clean, component=[component])
Expand Down