]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
dont append twice
authorHolger Levsen <holger@layer-acht.org>
Thu, 12 Apr 2012 16:11:02 +0000 (18:11 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 12 Apr 2012 16:11:02 +0000 (18:11 +0200)
debian_build.py

index 5e744e7309b34a04339c21efd30ab97d10b2479f..ef4a65fbd4a58bc0d4a2c1d8a66469f1187c6f0a 100755 (executable)
@@ -344,7 +344,7 @@ if __name__ == '__main__':
         daily_date = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
         if GIT_BRANCH_NAME.startswith('release/'):
             changelog_distro = 'production-proposed-updates'
-            # use shorter date as we can
+            # use shorter date because we can
             daily_date = datetime.datetime.now().strftime('%Y%m%d')
             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/'):
@@ -353,14 +353,17 @@ if __name__ == '__main__':
             # these uploads should go to a different repo:
             DPUT_OPTIONS = DPUT_OPTIONS_DEV
         else:
-            version = '%s~develop%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
             if GIT_REPO_PATH.startswith('/srv/git/dev/'):
                 if GIT_BRANCH_NAME == 'pre-staging':
+                    version = '%s~develop%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
                     changelog_distro = 'pre-staging'
                 else:
+                    # use shorter date because we can
+                    daily_date = datetime.datetime.now().strftime('%Y%m%d')
                     version = '%s~alpha%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
                     changelog_distro = 'unstable'
             else:
+                    version = '%s~develop%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
                     changelog_distro = 'pre-staging'
 
         new_log = 'Generated by jenkins build of %s' % current_commit