Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
observatory
update_sources.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
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
14
def
getDir
(rootdir, target):
15
sources = []
16
for
root, subdirs, files
in
os.walk(rootdir):
17
subdirs.sort()
18
files.sort()
19
for
f
in
files:
20
sources.append(root +
'/'
+ f)
21
return
sources
22
23
24
HEADER =
"""# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
25
# for details. All rights reserved. Use of this source code is governed by a
26
# BSD-style license that can be found in the LICENSE file.
27
28
# DO NOT EDIT. This file is generated by update_sources.py in this directory.
29
30
# This file contains all dart, css, and html sources for Observatory.
31
"""
32
33
34
def
main
():
35
with
open(
'observatory_sources.gni'
,
'w'
)
as
target:
36
target.write(HEADER)
37
target.write(
'observatory_sources = [\n'
)
38
sources = []
39
for
rootdir
in
[
'lib'
,
'web'
]:
40
sources.extend(
getDir
(rootdir, target))
41
sources.sort()
42
for
s
in
sources:
43
if
(s[-9:] !=
'README.md'
):
44
target.write(
' "'
+ s +
'",\n'
)
45
target.write(
']\n'
)
46
47
48
if
__name__ ==
"__main__"
:
49
main
()
main
Definition
main.py:1
update_sources.main
main()
Definition
update_sources.py:34
update_sources.getDir
getDir(rootdir, target)
Definition
update_sources.py:14
Generated on Fri Apr 26 2024 06:14:44 for Flutter Engine by
1.9.8