]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
make hotfix commits trigger uploads to staging, not production-p-u
authorHolger Levsen <holger@layer-acht.org>
Thu, 10 Nov 2011 13:09:00 +0000 (14:09 +0100)
committerHolger Levsen <holger@layer-acht.org>
Thu, 10 Nov 2011 13:09:00 +0000 (14:09 +0100)
kernel_inpbuilder.py

index d16e57a8498447f1c5000464cf11b30c7e4b2b32..692f0606f089f6ba051a8f5e65039d4d0e67983f 100644 (file)
@@ -262,9 +262,9 @@ def determine_kernel_flavour():
     flavour = GIT_REPO_NAME[6:-4]
 
     # slightly different version numbers per branch
-    if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix'):
+    if GIT_BRANCH_NAME == 'master':
         debian_version = '$(version)-%s+%s' % (pb_version, REVISION)
-    elif GIT_BRANCH_NAME.startswith('release'):
+    elif GIT_BRANCH_NAME.startswith('release') or GIT_BRANCH_NAME.startswith('hotfix'):
         debian_version = '$(version)-%s~rc%s' % (pb_version, REVISION)
     else:
         debian_version = '$(version)-%s~develop%s' % (pb_version, REVISION)
@@ -448,9 +448,9 @@ if __name__ == '__main__':
 
     logger.info('FTP Login on %s successful' %(ftp.host))
 
-    if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):
+    if GIT_BRANCH_NAME == 'master':
         ftp.cwd('production-proposed-updates')
-    elif GIT_BRANCH_NAME.startswith('release/'):
+    elif GIT_BRANCH_NAME.startswith('release/') or GIT_BRANCH_NAME.startswith('hotfix/'):
         ftp.cwd('staging');
     else:
         ftp.cwd('pre-staging');