# get the current commit id
current_commit = git_helper.git_get_commit_id()
- if options.distribution in ('testing', 'staging', 'unstable', 'pre-staging','experimental') or GIT_BRANCH_NAME.startswith('release/'):
+ # FIXME: we should really only test for branch names here, not for distros
+ if options.distribution in ('testing', 'staging', 'unstable', 'pre-staging','experimental'):
daily_date = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
-
+ if GIT_BRANCH_NAME.startswith('release/'):
+ daily_date = datetime.datetime.now().strftime('%Y%m%d')
if GIT_BRANCH_NAME.startswith('release/'):
version = '%s~rc%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
print line
# we need to commit here else git-buildpackage will use the existing debian/changelog...
- # TODO: Later we should investigate why the "--ignore-new" trick
- # did not work!
+ # TODO: Later we should investigate why "--ignore-new" does not work!
cmd = ['/usr/bin/git', 'add', '-A']
subprocess.check_call(cmd)
cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add new changelog entry']
if GIT_BRANCH_NAME == 'experimental' or GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/'):
pb_suite=changelog_distro
- elif GIT_BRANCH_NAME.startswith('release/') or options.distribution in ('unstable' , 'pre-staging'):
- pb_suite='pre-staging'
- elif GIT_BRANCH_NAME.startswith('hotfix/') or options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates'):
+ elif GIT_BRANCH_NAME.startswith('hotfix/') or GIT_BRANCH_NAME.startswith('release/') or options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates'):
pb_suite='production-proposed-updates'
+ elif options.distribution in ('unstable' , 'pre-staging'):
+ pb_suite='pre-staging'
logger.info('dist: %s' %(pb_suite))
cmd = ['figlet-figlet', '-t', 'dist: %s' %(pb_suite)]