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

Side by Side Diff: third_party/polymer/v1_0/create_components_summary.py

Issue 1623693002: Tidy up in Polymer directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/polymer/v1_0/components_summary.txt ('k') | third_party/polymer/v1_0/reproduce.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6 import json
7
8 COMPONENTS_DIR = 'components-chromium'
9 COMPONENT_SUMMARY =\
10 """Name: %(name)s
11 Version: %(version)s
12 Repository: %(repository)s
13 Tag: %(tag)s
14 Revision: %(revision)s
15 Tree link: %(tree)s
16 """
17
18 for entry in sorted(os.listdir(COMPONENTS_DIR)):
19 component_path = os.path.join(COMPONENTS_DIR, entry)
20 if not os.path.isdir(component_path):
21 continue
22 bower_path = os.path.join(component_path, '.bower.json')
23 if not os.path.isfile(bower_path):
24 raise Exception('%s is not a file.' % bower_path)
25 with open(bower_path) as stream:
26 info = json.load(stream)
27 repository = info['_source']
28 tree = 'https%s/tree/%s' % (repository[3:-4], info['_resolution']['tag'])
29 print COMPONENT_SUMMARY % {
30 'name': info['name'],
31 'version': info['version'],
32 'repository': repository,
33 'tag': info['_resolution']['tag'],
Dan Beam 2016/02/09 02:06:02 probably doesn't matter much, but when trying to t
34 'revision': info['_resolution']['commit'],
35 'tree': tree
36 }
OLDNEW
« no previous file with comments | « third_party/polymer/v1_0/components_summary.txt ('k') | third_party/polymer/v1_0/reproduce.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698