Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: globals/get_browser_versions.py

Issue 6702768332996608: Issue 2432 - Auto-generate browser versions on requirements page (Closed)
Left Patch Set: Removed debug print Created May 13, 2015, 6:38 p.m.
Right Patch Set: Removed build ID an try-block for SeaMonkey Aurora and Nightly Created May 15, 2015, 10:19 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « .hgignore ('k') | pages/requirements.tmpl » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 versions = { 71 return {
72 'current': get_seamonkey_version('2.32', '20150112201917', 'release'), 72 'current': get_seamonkey_version('2.32', '20150112201917', 'release'),
73 'unreleased': [get_seamonkey_version('2.32', '20150101215737', 'beta')] 73 'unreleased': [
74 } 74 get_seamonkey_version('2.32', '20150101215737', 'beta'),
75 75
76 # Aurora builds for Windows, and Nighlies for all platforms 76 # Aurora and Nightly builds for Windows are currently broken.
77 # are currently broken, and don't seem to come back soon. 77 # https://bugzilla.mozilla.org/show_bug.cgi?id=1086553
78 # https://bugzilla.mozilla.org/show_bug.cgi?id=1086553 78 get_seamonkey_version('2.32', '-', 'aurora', platform='Linux_x86-gcc3'),
79 for channel in ('aurora', 'nightly'): 79 get_seamonkey_version('2.32', '-', 'nightly', platform='Linux_x86-gcc3')
80 try: 80 ]
81 version = get_seamonkey_version('2.13.1', '20120909051705', channel, platf orm='Linux_x86-gcc3') 81 }
Wladimir Palant 2015/05/14 19:53:19 Nit: use '2.32', '-' here? Aurora and Nightly chan
Sebastian Noack 2015/05/15 10:24:54 Done. Note that while nightlies weren't working, s
82 except Exception:
83 continue
84 versions['unreleased'].append(version)
85
86 return versions
87 82
88 BROWSERS['seamonkey'] = get_seamonkey_versions 83 BROWSERS['seamonkey'] = get_seamonkey_versions
89 84
90 def get_chrome_version(manifest): 85 def get_chrome_version(manifest):
91 return manifest.getAttribute('version').split('.')[0] 86 return manifest.getAttribute('version').split('.')[0]
92 87
93 def get_chrome_versions(): 88 def get_chrome_versions():
94 response = urllib2.urlopen(urllib2.Request('https://tools.google.com/service/u pdate2', CHROME_UPDATE_XML)) 89 response = urllib2.urlopen(urllib2.Request('https://tools.google.com/service/u pdate2', CHROME_UPDATE_XML))
95 try: 90 try:
96 doc = minidom.parse(response) 91 doc = minidom.parse(response)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 cache[browser] = versions 201 cache[browser] = versions
207 file.seek(0) 202 file.seek(0)
208 json.dump(cache, file) 203 json.dump(cache, file)
209 file.truncate() 204 file.truncate()
210 205
211 if not versions['previous']: 206 if not versions['previous']:
212 logging.warning("Couldn't determine previous browser version, " 207 logging.warning("Couldn't determine previous browser version, "
213 'please set %s.previous in %s', browser, filename) 208 'please set %s.previous in %s', browser, filename)
214 209
215 return versions 210 return versions
LEFTRIGHT

Powered by Google App Engine
This is Rietveld