]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
dont put the full git branch name into the packages names, just the flavor part
authorHolger Levsen <holger@layer-acht.org>
Sun, 18 Sep 2011 11:05:58 +0000 (13:05 +0200)
committerHolger Levsen <holger@layer-acht.org>
Sun, 18 Sep 2011 11:05:58 +0000 (13:05 +0200)
kernel_inpbuilder.py

index 7e737998e28cf536fca6e25d47820e7f9c7d9eab..417fcea021ae4c30a176652bb2d341952c4247a2 100644 (file)
@@ -204,7 +204,7 @@ def build_kernel(revision, parallel_jobs='auto', distcc=False):
 
     cmd = [MAKE_KPKG, '-j', '%s' %(parallel_jobs), '--arch',
             '%s' %(BUILD_ARCH), '--rootcmd', 'fakeroot', '--revision',
-            '%s' %(revision), '--initrd', '--arch_in_name', 'kernel_debug',
+            '%s' %(revision), '--initrd', 'kernel_debug',
             'kernel_image', 'kernel_source', 'kernel_headers', 'modules']
 
     logger.info('start compile process')
@@ -245,7 +245,17 @@ def add_local_version_to_config(kernel_build_revision):
                 'No config file found at %s' %(KERNEL_CONFIG_PATH)
         )
     kernel_config = read_file(KERNEL_CONFIG_PATH)
-    localversion = '-%s-%s' %(GIT_BRANCH_NAME, BUILD_ARCH)
+    # don't put the branch names into the packages names
+    if GIT_BRANCH_NAME[7:] == 'master-'
+        flavor=GIT_BRANCH_NAME[:7]
+    elif GIT_BRANCH_NAME[8:] == 'develop-'
+        flavor=GIT_BRANCH_NAME[:8]
+    elif GIT_BRANCH_NAME[8:] == 'release-'
+        flavor=GIT_BRANCH_NAME[:8]
+    elif GIT_BRANCH_NAME[7:] == 'hotfix-'
+        flavor=GIT_BRANCH_NAME[:7]
+
+    localversion = '-profitbricks-%s' %(flavor)
     for lino, line in kernel_config.iteritems():
         try:
             key, value = CREG_KERNEL_CONFIG_DELIM.split(line)