]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build.py: Read the VERSION_SUFFIX environment variable
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 4 Jul 2014 09:34:28 +0000 (11:34 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 4 Jul 2014 09:34:28 +0000 (11:34 +0200)
debian_build.py

index 8c215fd9c88eda1de67ef435842478378ecaf55d..4f0024f0d03500370a447b1f3b6da3920daaad30 100755 (executable)
@@ -33,6 +33,7 @@ logger = logger_init(re.match('^(.*/jenkins_build_script/)(.*)', __file__).group
 # jenkins environment - parameters
 ENV.setdefault('NO_UPLOAD', '')
 ENV.setdefault('BUILD_TRIGGERS', '')
+ENV.setdefault('VERSION_SUFFIX', '')
 ENV.setdefault('GIT_BRANCH_NAME', ENV['GIT_BRANCH'])
 if ENV['GIT_BRANCH'] != ENV['GIT_BRANCH_NAME']:
     ENV['GIT_BRANCH'] = ENV['GIT_BRANCH_NAME']
@@ -97,7 +98,7 @@ def getopts():
     parser.add_option(
         '--version-suffix',
         dest='version_suffix',
-        default='',
+        default=ENV['VERSION_SUFFIX'],
         help='Add the specified suffix to the Debian version. Default is none.'
     )
 
@@ -282,7 +283,7 @@ if __name__ == '__main__':
             ))
             exit_error()
         new_dist = 'unstable'
-        new_version = '{version}~develop{date}+{build}+{commit}'.format(
+        new_version = '{version}~develop{date}+{build}+{commit}{suffix}'.format(
             version=curr_version,
             date=daily_date,
             build=ENV['BUILD_NUMBER'],