This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug 660319: update release_sanity.py for new l10n dashboard beta prod…
…uct names. r=catlee
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |