From da78da63564e4d3bff345f8107d89819aa4ee6d3 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 12 Jan 2012 10:34:08 +0100 Subject: [PATCH] support new parameter, NO_UPLOAD, to do exactly that --- debian_build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian_build.py b/debian_build.py index 5e6e261..d043b64 100755 --- a/debian_build.py +++ b/debian_build.py @@ -73,6 +73,8 @@ DPUT_OPTIONS = { } DPUT_CF = os.path.join(GIT_TARGET_WORKSPACE, 'dput.cf') +NO_UPLOAD = os.environ.get('NO_UPLOAD') + log_format = '%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s' formatter = Formatter(log_format) logging.basicConfig( @@ -437,8 +439,9 @@ if __name__ == '__main__': fh = open(changes_file, 'r') logger.info('%s' % (fh.read())) fh.close() - # upload - dput_package_upload(changes_file) + # upload (if NO_UPLOAD is not set) + if NO_UPLOAD == "None": + dput_package_upload(changes_file) except Exception, error: logger.exception(error) exit_error() -- 2.39.5