From: Benjamin Drung Date: Fri, 4 Jul 2014 09:34:28 +0000 (+0200) Subject: debian_build.py: Read the VERSION_SUFFIX environment variable X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=7e5aa98efd161e676463a05dd4deff37dae6bb23;p=profitbricks%2Fjenkins-build-scripts.git debian_build.py: Read the VERSION_SUFFIX environment variable --- diff --git a/debian_build.py b/debian_build.py index 8c215fd..4f0024f 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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'],