From 3d1f0739740561bedaf43c6bdd85919e13626746 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 18 Sep 2011 17:03:02 +0200 Subject: [PATCH] support uploads to staging and improve code soemwhat --- kernel_inpbuilder.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index 0d756a1..3d8a976 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -206,7 +206,7 @@ def build_kernel(version, revision, parallel_jobs='auto', distcc=False): '%s' %(BUILD_ARCH), '--rootcmd', 'fakeroot', '--append-to-version', '-%s' %(version), '--initrd', '--arch-in-name', - 'configure' ] + 'kernel_image' ] #'kernel_debug', # 'kernel_image', 'kernel_source', 'kernel_headers', 'modules'] @@ -250,13 +250,13 @@ def add_local_version_to_config(kernel_build_revision): ) kernel_config = read_file(KERNEL_CONFIG_PATH) # don't put the branch names into the packages names - if GIT_BRANCH_NAME[:7] == 'master-': + if GIT_BRANCH_NAME.startswith('master-'): flavour = GIT_BRANCH_NAME[7:] - elif GIT_BRANCH_NAME[:8] == 'develop-': + elif GIT_BRANCH_NAME.startswith('develop-'): flavour = GIT_BRANCH_NAME[8:] - elif GIT_BRANCH_NAME[:8] == 'release-': + elif GIT_BRANCH_NAME.startswith('release-'): flavour = GIT_BRANCH_NAME[8:] - elif GIT_BRANCH_NAME[:7] == 'hotfix-': + elif GIT_BRANCH_NAME.startswith('hotfix-'): flavour = GIT_BRANCH_NAME[7:] else: logger.error('GIT_BRANCH_NAME is %s, flavour is none.' % GIT_BRANCH_NAME) @@ -447,8 +447,10 @@ if __name__ == '__main__': logger.info('FTP Login on %s successful' %(ftp.host)) - if GIT_BRANCH_NAME.startswith('master-'): + if GIT_BRANCH_NAME.startswith('master-') or GIT_BRANCH_NAME.startswith('hotfix-'): ftp.cwd('production-proposed-updates') + elif GIT_BRANCH_NAME.startswith('release-'): + ftp.cwd('staging'); else: ftp.cwd('pre-staging'); -- 2.39.5