Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
bug 660319: update release_sanity.py for new l10n dashboard beta prod…
Browse files Browse the repository at this point in the history
…uct names. r=catlee
  • Loading branch information
bhearsum committed Jun 3, 2011
1 parent 7261b25 commit 92905d8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 4 additions & 2 deletions buildbot-helpers/release_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from util.file import compare
from util.hg import make_hg_url
from release.info import readReleaseConfig, getRepoMatchingBranch
from release.versions import getL10nDashboardVersion
import logging
log = logging.getLogger(__name__)

Expand Down Expand Up @@ -130,8 +131,9 @@ def verify_l10n_changesets(hgHost, l10n_changesets):
def verify_l10n_dashboard(l10n_changesets):
"""Checks the l10n-changesets against the l10n dashboard"""
success = True
dash_url = 'https://l10n-stage-sj.mozilla.org/shipping/l10n-changesets?ms=fx%(version)s' % {
'version': releaseConfig['version'],
dash_url = 'https://l10n-stage-sj.mozilla.org/shipping/l10n-changesets?ms=%(version)s' % {
'version': getL10nDashboardVersion(releaseConfig['version'],
releaseConfig['productName']),
}
log.info("Comparing l10n changesets on dashboard %s to on-disk %s ..."
% (dash_url, l10n_changesets))
Expand Down
17 changes: 17 additions & 0 deletions lib/python/release/versions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
import re

from build.versions import ANY_VERSION_REGEX

def getPrettyVersion(version):
version = re.sub(r'a([0-9]+)$', r' Alpha \1', version)
version = re.sub(r'b([0-9]+)$', r' Beta \1', version)
version = re.sub(r'rc([0-9]+)$', r' RC \1', version)
return version

def getL10nDashboardVersion(version, product):
if product == 'firefox':
ret = 'fx'
elif product == 'thunderbird':
ret = 'tb'
elif product == 'seamonkey':
ret = 'sea'

parsed = re.match(ANY_VERSION_REGEX, version)
if parsed.group(1) and parsed.group(1).startswith('b'):
ret = '%s%s_beta_%s' % (ret, version[0], parsed.group(1))
else:
ret += version
return ret

0 comments on commit 92905d8

Please sign in to comment.