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

Side by Side Diff: runtime/observatory/update_sources.py

Issue 2264513003: Added observatory_sources.gypi update script (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « runtime/observatory/observatory_sources.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file.
6
7 # Updates the list of Observatory source files.
8
9 import os
10 import sys
11 from datetime import date
12
13 def getDir(rootdir, target):
14 sources = []
15 for root, subdirs, files in os.walk(rootdir):
16 subdirs.sort()
17 files.sort()
18 for f in files:
19 sources.append(root + '/' + f)
20 return sources
21
22 def main():
23 target = open('observatory_sources.gypi', 'w')
24 target.write('# Copyright (c) ')
25 target.write(str(date.today().year))
26 target.write(', the Dart project authors. Please see the AUTHORS file\n');
27 target.write('# for details. All rights reserved. Use of this source code is governed by a\n');
28 target.write('# BSD-style license that can be found in the LICENSE file.\n') ;
29 target.write('\n');
30 target.write('# This file contains all dart, css, and html sources for Obser vatory.\n');
31 target.write('{\n \'sources\': [\n')
32 sources = []
33 for rootdir in ['lib', 'web']:
34 sources.extend(getDir(rootdir, target))
35 sources.sort()
36 for s in sources:
37 if (s[-9:] != 'README.md'):
38 target.write(' \'' + s + '\',\n')
39 target.write(' ]\n}\n')
40 target.close()
41
42 if __name__ == "__main__":
43 main()
OLDNEW
« no previous file with comments | « runtime/observatory/observatory_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698