From 66f53ee2c5dbcfc11badc9aadc5308852c0672be Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Tue, 22 Jan 2019 11:04:42 +0100 Subject: [PATCH] [scripts][ci] Fix PyPI upload --- bob/devtools/scripts/ci.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bob/devtools/scripts/ci.py b/bob/devtools/scripts/ci.py index da6cde51..8f7d069c 100644 --- a/bob/devtools/scripts/ci.py +++ b/bob/devtools/scripts/ci.py @@ -192,7 +192,7 @@ Examples: 'printing to help you understand what will be done') @verbosity_option() @bdt.raise_on_error -def pypi(dry_run): +def pypi(package, dry_run): """Deploys build artifacts (python packages to PyPI) Deployment is only allowed for packages in which the visibility is @@ -204,8 +204,6 @@ def pypi(dry_run): logger.warn('!!!! DRY RUN MODE !!!!') logger.warn('Nothing is being deployed to server') - package = os.environ['CI_PROJECT_PATH'] - # determine project visibility visible = (os.environ['CI_PROJECT_VISIBILITY'] == 'public') @@ -213,7 +211,8 @@ def pypi(dry_run): raise RuntimeError('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.' % package) + 'and set this repository to "public" before trying again.' % \ + os.environ['CI_PROJECT_PATH']) from ..constants import CACERT from twine.settings import Settings @@ -228,7 +227,7 @@ def pypi(dry_run): if not dry_run: from twine.commands.upload import upload - for k in packages: + for k in package: logger.info('Deploying python package %s to PyPI', k) upload(settings, [k]) -- GitLab