]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build.py: Add support for AUTO_CHANGELOG=yes
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Tue, 26 Aug 2014 12:16:35 +0000 (14:16 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Tue, 26 Aug 2014 12:16:35 +0000 (14:16 +0200)
debian_build.py

index 6e5ebfbbfe20d4d9754f9f199889e8fb7f3b9a75..9cca836d3042ef45805f2b6b6d372f197a6ddcc5 100755 (executable)
@@ -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':