]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix release branch support and drop support for branches called experimental
authorHolger Levsen <holger@layer-acht.org>
Tue, 13 Mar 2012 14:44:11 +0000 (15:44 +0100)
committerHolger Levsen <holger@layer-acht.org>
Tue, 13 Mar 2012 14:44:11 +0000 (15:44 +0100)
debian_build.py

index 54d6b19de34111d8496b1f9e026985f7ff885033..2985243b2ab4435a8a34122db4fb1ee8cd7bfb5c 100755 (executable)
@@ -327,15 +327,13 @@ if __name__ == '__main__':
     # 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
@@ -344,7 +342,7 @@ if __name__ == '__main__':
 
         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
@@ -396,7 +394,7 @@ if __name__ == '__main__':
     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'