]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build.py: Add --version-suffix parameter.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Thu, 9 Jan 2014 13:54:27 +0000 (14:54 +0100)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Thu, 9 Jan 2014 13:54:27 +0000 (14:54 +0100)
debian_build.py

index f318a6164a47281bef6a7aaaf6a384986d674e5d..402f67fcb558f0312af2389f4ffa341d39b6443b 100755 (executable)
@@ -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)