Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: tools/release/releases.py

Issue 1063073003: Retrieval of information by release channel (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Chrome release data now dumped into JSON Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/releases.py
diff --git a/tools/release/releases.py b/tools/release/releases.py
index 5084aa6d0c6bc31a5b1a9a8160814d3249387d5c..a92af331046a168a1ec928ab101051d5050ffe98 100755
--- a/tools/release/releases.py
+++ b/tools/release/releases.py
@@ -444,6 +444,10 @@ class WriteOutput(Step):
MESSAGE = "Print output."
def Run(self):
+
+ output = {'releases':self['releases'],
+ 'chrome_releases':self['chrome_releases']}
+
if self._options.csv:
with open(self._options.csv, "w") as f:
writer = csv.DictWriter(f,
@@ -455,9 +459,9 @@ class WriteOutput(Step):
writer.writerow(release)
if self._options.json:
with open(self._options.json, "w") as f:
- f.write(json.dumps(self["releases"]))
+ f.write(json.dumps(output))
if not self._options.csv and not self._options.json:
- print self["releases"] # pragma: no cover
+ print output # pragma: no cover
class Releases(ScriptsBase):
@@ -486,16 +490,44 @@ class Releases(ScriptsBase):
}
def _Steps(self):
+
return [
Preparation,
RetrieveV8Releases,
UpdateChromiumCheckout,
RetrieveChromiumV8Releases,
RietrieveChromiumBranches,
Michael Achenbach 2015/04/15 09:27:53 nit: could you clean up my old spelling mistake: R
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
+ RetrieveInformationOnCanary,
CleanUp,
- WriteOutput,
+ WriteOutput
Michael Achenbach 2015/04/15 09:27:53 nit: , in the end are generally recommended in cas
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
]
Michael Achenbach 2015/04/15 09:27:53 Please move class up so that the order of steps ma
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
+class RetrieveInformationOnCanary(Step):
+ MESSAGE = 'Retrieves relevant information on the latest Chrome Canary'
+
+ def Run(self):
+
+ params = None
+ resultRaw = self.ReadURL('http://omahaproxy.appspot.com/all.json', params, wait_plan=[5, 20])
Michael Achenbach 2015/04/15 09:27:53 nit: 80 chars
Michael Achenbach 2015/04/15 09:27:53 nit: All v8-side scripts use " instead of ' due to
Michael Achenbach 2015/04/15 09:27:53 nit (style): Use _ for local variables not camel c
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
Michael Hablich 2015/04/15 09:35:45 Acknowledged.
+ recentReleases = json.loads(resultRaw)
+ print recentReleases
Michael Achenbach 2015/04/15 09:27:53 Can the print go away in the final version? Or pre
Michael Hablich 2015/04/15 09:35:45 Will go away.
+
+ allCanaries = []
Michael Achenbach 2015/04/15 09:27:53 Call just canaries?
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
+
+ for currentOS in recentReleases:
+ for currentVersion in currentOS['versions']:
+ currentCandidate = {'version':currentVersion['version'],
Michael Achenbach 2015/04/15 09:27:53 Move under the condition below? Or are there comin
Michael Achenbach 2015/04/15 09:27:53 Please qualify 'version' since we have more now, e
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
Michael Hablich 2015/04/15 09:35:44 More channels coming. Wanted to finish Canary firs
+ 'os':currentVersion['os'],
Michael Achenbach 2015/04/15 09:27:53 nit: indentation - either align all keys or use a
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
+ 'release_date': currentVersion['current_reldate'],
+ 'v8_version':currentVersion['v8_version']}
Michael Achenbach 2015/04/15 09:27:53 nit: always one space after : also below
Michael Hablich 2015/04/15 09:35:44 Acknowledged.
+
+ if currentVersion['channel'] == 'canary':
+ allCanaries.append(currentCandidate)
+
+ chromeReleases = {'canaries':allCanaries}
+ self['chrome_releases'] = chromeReleases
+
+
if __name__ == "__main__": # pragma: no cover
sys.exit(Releases().Run())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698