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
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');