From e7eba6f99574cd8393bdf5a4061812352c08080c Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Mon, 17 Feb 2020 17:51:35 +0100 Subject: [PATCH] [scripts/ci] Fix pypi stage to skip deployment if package is private (closes #50) --- bob/devtools/scripts/ci.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bob/devtools/scripts/ci.py b/bob/devtools/scripts/ci.py index 792f818e..76af5f20 100644 --- a/bob/devtools/scripts/ci.py +++ b/bob/devtools/scripts/ci.py @@ -286,13 +286,14 @@ def pypi(package, dry_run): public = os.environ["CI_PROJECT_VISIBILITY"] == "public" if not public: - raise RuntimeError( + logger.warn( "The repository %s is not public - a package " "deriving from it therefore, CANNOT be published to PyPI. " "You must follow the relevant software disclosure procedures " - 'and set this repository to "public" before trying again.' - % os.environ["CI_PROJECT_PATH"] - ) + 'and set this repository to "public" before trying again.', + os.environ["CI_PROJECT_PATH"] + ) + return from ..constants import CACERT from twine.settings import Settings -- GitLab