From: Benjamin Drung Date: Tue, 26 Aug 2014 12:16:35 +0000 (+0200) Subject: debian_build.py: Add support for AUTO_CHANGELOG=yes X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=17b70b5d4a3e5a49f8625eb4429ca36ca92aa9dc;p=profitbricks%2Fjenkins-build-scripts.git debian_build.py: Add support for AUTO_CHANGELOG=yes --- diff --git a/debian_build.py b/debian_build.py index 6e5ebfb..9cca836 100755 --- a/debian_build.py +++ b/debian_build.py @@ -31,7 +31,6 @@ from lib import sbuild ENV.setdefault('NO_UPLOAD', '') ENV.setdefault('BUILD_TRIGGERS', '') ENV.setdefault('VERSION_SUFFIX', '') -ENV.setdefault('REBUILD_DIST', '') ENV.setdefault('GIT_BRANCH_NAME', ENV['GIT_BRANCH']) if ENV['GIT_BRANCH'] != ENV['GIT_BRANCH_NAME']: ENV['GIT_BRANCH'] = ENV['GIT_BRANCH_NAME'] @@ -50,7 +49,6 @@ DISTRO_SUFFIX = { AUTO_CHANGELOG_REPONAMES = ( 'so-docs', 'infrastructure-docs', - 'sl', 'storage-docs', ) STABLE_DISTRIBUTIONS = ( @@ -278,12 +276,12 @@ def main(): # Act II: make decissions # change the distribution if REBUILD_DIST is set in the environment rebuild_suffix = '' - if ENV['REBUILD_DIST'] in SUPPORTED_DISTRIBUTIONS: + if ENV.get('REBUILD_DIST') in SUPPORTED_DISTRIBUTIONS: logger.info('REBUILD_DIST is set. Change distribution {old} => {new}.' .format(old=curr_dist, new=ENV['REBUILD_DIST'])) curr_dist = ENV['REBUILD_DIST'] rebuild_suffix = DISTRO_SUFFIX[ENV['REBUILD_DIST']] - elif ENV['REBUILD_DIST']: + elif ENV.get('REBUILD_DIST'): logger.warn('REBUILD_DIST {dist} not supported. Please select from: {supported}'.format( dist=ENV['REBUILD_DIST'], supported=", ".join(SUPPORTED_DISTRIBUTIONS) @@ -313,7 +311,7 @@ def main(): # replace valid debian version chars that are invalid for git tagging new_tag = curr_version.replace('~', '_').replace(':', ',') # .. only take care of changelog automation if we want it to - if repo_name in AUTO_CHANGELOG_REPONAMES: + if repo_name in AUTO_CHANGELOG_REPONAMES or ENV.get('AUTO_CHANGELOG') == "yes": do_autoincrement = True # reset actions if curr_dist == 'squeeze':