# get the current commit id
current_commit = git_helper.git_get_commit_id()
- # FIXME: we should really only test for branch names here, not for distros
- if options.distribution in ('testing', 'staging', 'unstable', 'pre-staging','experimental'):
+ if GIT_BRANCH_NAME == 'develop' or GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/') or GIT_BRANCH_NAME.startswith('release/'):
daily_date = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
if GIT_BRANCH_NAME.startswith('release/'):
+ # use shorter date as we can
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])
- elif GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/') or options.distribution == 'experimental':
+ elif GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/'):
version = '%s~experimental%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
# these uploads should go to a different repo:
DPUT_OPTIONS = DPUT_OPTIONS_DEV
new_log = 'Generated by jenkins build of %s' % current_commit
- if GIT_BRANCH_NAME == 'experimental' or GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/'):
+ if GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/'):
changelog_distro ='dev-'+ GIT_BRANCH_NAME.replace("/","-")
else:
changelog_distro = options.distribution
cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add new changelog entry']
subprocess.check_call(cmd)
- if GIT_BRANCH_NAME == 'experimental' or GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/'):
+ if 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('hotfix/') or GIT_BRANCH_NAME.startswith('release/') or options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates'):
pb_suite='production-proposed-updates'