Permalink
Browse files

Bug 542142, support signing lorentz betas with versions like 3.6.3plu…

…gin1, r=catlee
  • Loading branch information...
1 parent 3d0ad01 commit 79b1f0753bd5e7a43d32463fd95c8a5d01cf2a8a @nthomas-mozilla nthomas-mozilla committed Mar 25, 2010
Showing with 35 additions and 4 deletions.
  1. +3 −2 release/signing/signing.py
  2. +32 −2 release/signing/tests.py
@@ -60,10 +60,11 @@ def fileInfo(filepath, product):
except:
# Mozilla 1.9.1 and on style (aka 'long') paths
# e.g. update/win32/en-US/firefox-3.5.1.complete.mar
+ # win32/en-US/Firefox Setup 3.5.1.exe
ret = {'pathstyle': 'long'}
if filepath.endswith('.mar'):
ret['format'] = 'mar'
- m = re.search("update/(win32|linux-i686|mac)/([-a-zA-Z]+)/(%s)-(\w+\.\w+(?:\.\w+)?(?:-\w+\.\w+)?)\.(complete)\.mar" % product, filepath)
+ m = re.search("update/(win32|linux-i686|mac)/([-a-zA-Z]+)/(%s)-(\d+\.\d+(?:\.\d+)?(?:\w+\d+)?)\.(complete)\.mar" % product, filepath)
if not m:
raise ValueError("Could not parse: %s" % filepath)
ret['platform'] = m.group(1)
@@ -73,7 +74,7 @@ def fileInfo(filepath, product):
ret['contents'] = m.group(5)
elif filepath.endswith('.exe'):
ret['format'] = 'exe'
- m = re.search("(win32)/([-a-zA-Z]+)/((?i)%s) Setup ([\d\.]+(?:\ \w+\ \d+)?)\.exe" % product, filepath)
+ m = re.search("(win32)/([-a-zA-Z]+)/((?i)%s) Setup (\d+\.\d+(?:\.\d+)?(?:\w+\d+)?(?:\ \w+\ \d+)?)\.exe" % product, filepath)
if not m:
raise ValueError("Could not parse: %s" % filepath)
ret['platform'] = m.group(1)
View
@@ -23,19 +23,44 @@ def testFileInfo(self):
dict(product='firefox', version='3.0.12', locale='es',
platform='win32', contents='installer', format='exe',
pathstyle='short',)),
+ ('unsigned/update/win32/en-US/firefox-3.5rc3.complete.mar',
+ 'firefox',
+ dict(product='firefox', version='3.5rc3', locale='en-US',
+ platform='win32', contents='complete', format='mar',
+ pathstyle='long',)),
+ ('unsigned/update/win32/en-US/firefox-3.5.complete.mar',
+ 'firefox',
+ dict(product='firefox', version='3.5', locale='en-US',
+ platform='win32', contents='complete', format='mar',
+ pathstyle='long',)),
('unsigned/update/win32/en-US/firefox-3.5.1.complete.mar',
'firefox',
dict(product='firefox', version='3.5.1', locale='en-US',
platform='win32', contents='complete', format='mar',
pathstyle='long',)),
+ ('unsigned/update/win32/en-US/firefox-3.5.12.complete.mar',
+ 'firefox',
+ dict(product='firefox', version='3.5.12', locale='en-US',
+ platform='win32', contents='complete', format='mar',
+ pathstyle='long',)),
+ ('unsigned/update/win32/en-US/firefox-3.6.3plugin2.complete.mar',
+ 'firefox',
+ dict(product='firefox', version='3.6.3plugin2', locale='en-US',
+ platform='win32', contents='complete', format='mar',
+ pathstyle='long',)),
('unsigned/update/win32/fr/firefox-3.5.1.complete.mar',
'firefox',
dict(product='firefox', version='3.5.1', locale='fr',
platform='win32', contents='complete', format='mar',
pathstyle='long',)),
- ('unsigned/win32/en-US/Firefox Setup 3.5.1.exe',
+ ('unsigned/win32/fr/Firefox Setup 3.5.1.exe',
'firefox',
- dict(product='firefox', version='3.5.1', locale='en-US',
+ dict(product='firefox', version='3.5.1', locale='fr',
+ platform='win32', contents='installer', format='exe',
+ pathstyle='long',)),
+ ('unsigned/win32/en-US/Firefox Setup 3.5.12.exe',
+ 'firefox',
+ dict(product='firefox', version='3.5.12', locale='en-US',
platform='win32', contents='installer', format='exe',
pathstyle='long',)),
('unsigned/win32/en-US/Firefox Setup 3.5.exe',
@@ -53,6 +78,11 @@ def testFileInfo(self):
dict(product='firefox', version='3.5 Beta 99', locale='en-US',
platform='win32', contents='installer', format='exe',
pathstyle='long',)),
+ ('unsigned/win32/en-US/Firefox Setup 3.6.3plugin2.exe',
+ 'firefox',
+ dict(product='firefox', version='3.6.3plugin2', locale='en-US',
+ platform='win32', contents='installer', format='exe',
+ pathstyle='long',)),
]
for path, product, info in tests:

0 comments on commit 79b1f07

Please sign in to comment.