From: Holger Levsen Date: Thu, 12 Apr 2012 16:11:02 +0000 (+0200) Subject: dont append twice X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=92dcdc1e36e2bdcdcf4af2382d8d5bfe6030be48;p=profitbricks%2Fjenkins-build-scripts.git dont append twice --- diff --git a/debian_build.py b/debian_build.py index 5e744e7..ef4a65f 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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