Skip to content
Snippets Groups Projects
Commit e7eba6f9 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[scripts/ci] Fix pypi stage to skip deployment if package is private (closes #50)

parent 1d55ff4f
No related branches found
No related tags found
No related merge requests found
Pipeline #37277 passed
...@@ -286,13 +286,14 @@ def pypi(package, dry_run): ...@@ -286,13 +286,14 @@ def pypi(package, dry_run):
public = os.environ["CI_PROJECT_VISIBILITY"] == "public" public = os.environ["CI_PROJECT_VISIBILITY"] == "public"
if not public: if not public:
raise RuntimeError( logger.warn(
"The repository %s is not public - a package " "The repository %s is not public - a package "
"deriving from it therefore, CANNOT be published to PyPI. " "deriving from it therefore, CANNOT be published to PyPI. "
"You must follow the relevant software disclosure procedures " "You must follow the relevant software disclosure procedures "
'and set this repository to "public" before trying again.' 'and set this repository to "public" before trying again.',
% os.environ["CI_PROJECT_PATH"] os.environ["CI_PROJECT_PATH"]
) )
return
from ..constants import CACERT from ..constants import CACERT
from twine.settings import Settings from twine.settings import Settings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment