From b5f1bc83aff8394b6f9070215df9b20c304bddca Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 19 Sep 2011 21:20:42 +0200 Subject: [PATCH] kernel repos use default git flow branches names too --- kernel_inpbuilder.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index b1c8350..2774d36 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -253,24 +253,13 @@ def create_file(path,data): raise def determine_kernel_flavour(): - # don't put the branch names into the packages names - # instead just use the flavour part: - if GIT_BRANCH_NAME.startswith('master-'): - flavour = GIT_BRANCH_NAME[7:] - elif GIT_BRANCH_NAME.startswith('develop-'): - flavour = GIT_BRANCH_NAME[8:] - elif GIT_BRANCH_NAME.startswith('release-'): - flavour = GIT_BRANCH_NAME[8:] - 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) - flavour = 'none' + flavour = GIT_REPO_NAME[6:] # slightly different version numbers per branch - if flavour in ('master', 'hotfix'): + if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix'): + # FIXME: not -build... debian_version = '$(version)-build%s' % REVISION - elif flavour == 'release': + elif GIT_BRANCH_NAME.startswith('release'): debian_version = '$(version)~rc%s' % REVISION else: debian_version = '$(version)~develop%s' % REVISION @@ -424,9 +413,9 @@ if __name__ == '__main__': logger.info('FTP Login on %s successful' %(ftp.host)) - if GIT_BRANCH_NAME.startswith('master-') or GIT_BRANCH_NAME.startswith('hotfix-'): + if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'): ftp.cwd('production-proposed-updates') - elif GIT_BRANCH_NAME.startswith('release-'): + elif GIT_BRANCH_NAME.startswith('release/'): ftp.cwd('staging'); else: ftp.cwd('pre-staging'); -- 2.39.5