From 65a74d23882b571c5dea08375153c6ca2db4ebb8 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 13 Mar 2012 15:24:58 +0100 Subject: [PATCH] release branches should trigger p-p-u builds --- debian_build.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/debian_build.py b/debian_build.py index 817c9f6..54d6b19 100755 --- a/debian_build.py +++ b/debian_build.py @@ -327,9 +327,11 @@ if __name__ == '__main__': # 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]) @@ -388,8 +390,7 @@ if __name__ == '__main__': 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'] @@ -397,10 +398,10 @@ if __name__ == '__main__': 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)] -- 2.39.5