From 2a13ae02338930662cac729ab62ca994b3aa0264 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 9 Jan 2014 14:54:27 +0100 Subject: [PATCH] debian_build.py: Add --version-suffix parameter. --- debian_build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/debian_build.py b/debian_build.py index f318a61..402f67f 100755 --- a/debian_build.py +++ b/debian_build.py @@ -95,6 +95,12 @@ def getopts(): default='INFO', help='Loglevel. Default: %default' ) + parser.add_option( + '--version-suffix', + dest='version_suffix', + default='', + help='Add the specified suffix to the Debian version. Default is none.' + ) return parser.parse_args() @@ -181,7 +187,7 @@ if __name__ == '__main__': )) exit_error() new_dist = 'stable' - new_version = curr_version + new_version = curr_version + options.version_suffix pb_suite = 'master-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist) @@ -230,6 +236,7 @@ if __name__ == '__main__': date=daily_date, build=ENV['BUILD_NUMBER'], commit=curr_commit_id[0:7], + suffix=options.version_suffix, ) pb_suite = 'develop-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist) @@ -246,11 +253,12 @@ if __name__ == '__main__': exit_error() new_dist = 'dev-{0}'.format(local_branch.replace("/", "-")) - new_version = '{version}~experimental{date}+{build}+{commit}'.format( + new_version = '{version}~experimental{date}+{build}+{commit}{suffix}'.format( version=curr_version, date=daily_date, build=ENV['BUILD_NUMBER'], commit=curr_commit_id[0:7], + suffix=options.version_suffix, ) pb_suite = 'experimental-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/dev-{dist}'.format(dist=curr_dist) -- 2.39.5