OLD | NEW |
1 import re | 1 import re |
2 import os | 2 import os |
3 import sys | 3 import sys |
4 import json | 4 import json |
5 import urllib2 | 5 import urllib2 |
6 import errno | 6 import errno |
7 import logging | 7 import logging |
8 from xml.dom import minidom | 8 from xml.dom import minidom |
9 | 9 |
10 from jinja2 import contextfunction | 10 from jinja2 import contextfunction |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 BROWSERS['firefox'] = lambda: get_mozilla_versions('Firefox', '37.0') | 63 BROWSERS['firefox'] = lambda: get_mozilla_versions('Firefox', '37.0') |
64 BROWSERS['thunderbird'] = lambda: get_mozilla_versions('Thunderbird', '31.0', Tr
ue) | 64 BROWSERS['thunderbird'] = lambda: get_mozilla_versions('Thunderbird', '31.0', Tr
ue) |
65 | 65 |
66 def get_seamonkey_version(origin_version, origin_build, channel, **kw): | 66 def get_seamonkey_version(origin_version, origin_build, channel, **kw): |
67 return get_mozilla_version('SeaMonkey', origin_version, channel, True, | 67 return get_mozilla_version('SeaMonkey', origin_version, channel, True, |
68 'aus2-community', origin_build, 'version', **kw) | 68 'aus2-community', origin_build, 'version', **kw) |
69 | 69 |
70 def get_seamonkey_versions(): | 70 def get_seamonkey_versions(): |
71 return { | 71 versions = { |
72 'current': get_seamonkey_version('2.32', '20150112201917', 'release'), | 72 'current': get_seamonkey_version('2.32', '20150112201917', 'release'), |
73 'unreleased': [ | 73 'unreleased': [get_seamonkey_version('2.32', '20150101215737', 'beta')] |
74 get_seamonkey_version('2.32', '20150101215737', 'beta'), | 74 } |
75 | 75 |
76 # Aurora and Nightly builds for Windows are currently broken. | 76 # Aurora and Nightly builds for Windows are permantently broken. |
77 # https://bugzilla.mozilla.org/show_bug.cgi?id=1086553 | 77 # Occasionally, builds for other platforms are broken as well. |
78 get_seamonkey_version('2.32', '-', 'aurora', platform='Linux_x86-gcc3'), | 78 # https://bugzilla.mozilla.org/show_bug.cgi?id=1086553 |
79 get_seamonkey_version('2.32', '-', 'nightly', platform='Linux_x86-gcc3') | 79 for channel in ('aurora', 'nightly'): |
80 ] | 80 try: |
81 } | 81 version = get_seamonkey_version('2.32', '-', channel, platform='Linux_x86-
gcc3') |
| 82 except Exception: |
| 83 continue |
| 84 versions['unreleased'].append(version) |
| 85 |
| 86 return versions |
82 | 87 |
83 BROWSERS['seamonkey'] = get_seamonkey_versions | 88 BROWSERS['seamonkey'] = get_seamonkey_versions |
84 | 89 |
85 def get_chrome_version(manifest): | 90 def get_chrome_version(manifest): |
86 return manifest.getAttribute('version').split('.')[0] | 91 return manifest.getAttribute('version').split('.')[0] |
87 | 92 |
88 def get_chrome_versions(): | 93 def get_chrome_versions(): |
89 response = urllib2.urlopen(urllib2.Request('https://tools.google.com/service/u
pdate2', CHROME_UPDATE_XML)) | 94 response = urllib2.urlopen(urllib2.Request('https://tools.google.com/service/u
pdate2', CHROME_UPDATE_XML)) |
90 try: | 95 try: |
91 doc = minidom.parse(response) | 96 doc = minidom.parse(response) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 cache[browser] = versions | 206 cache[browser] = versions |
202 file.seek(0) | 207 file.seek(0) |
203 json.dump(cache, file) | 208 json.dump(cache, file) |
204 file.truncate() | 209 file.truncate() |
205 | 210 |
206 if not versions['previous']: | 211 if not versions['previous']: |
207 logging.warning("Couldn't determine previous browser version, " | 212 logging.warning("Couldn't determine previous browser version, " |
208 'please set %s.previous in %s', browser, filename) | 213 'please set %s.previous in %s', browser, filename) |
209 | 214 |
210 return versions | 215 return versions |
OLD | NEW |