File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 5
5
import 'dart:io' ;
6
6
7
7
const argDevToolsBuild = 'devtools-build' ;
8
+ const argUpdatePerfetto = '--update-perfetto' ;
8
9
9
10
void main (List <String > args) async {
11
+ final shouldUpdatePerfetto = args.contains (argUpdatePerfetto);
12
+
10
13
final mainDevToolsDirectory = Directory .current;
11
14
if (! mainDevToolsDirectory.path.endsWith ('/devtools' )) {
12
15
throw Exception ('Please execute this script from your top level '
@@ -23,7 +26,9 @@ void main(List<String> args) async {
23
26
print ('Running the build_release.sh script...' );
24
27
final buildProcess = await Process .start (
25
28
'./tool/build_release.sh' ,
26
- [],
29
+ [
30
+ if (shouldUpdatePerfetto) argUpdatePerfetto,
31
+ ],
27
32
workingDirectory: mainDevToolsDirectory.path,
28
33
);
29
34
_forwardOutputStreams (buildProcess);
Original file line number Diff line number Diff line change 4
4
# Use of this source code is governed by a BSD-style license that can be
5
5
# found in the LICENSE file.
6
6
7
+ # Contains a path to this script, relative to the directory it was called from.
8
+ RELATIVE_PATH_TO_SCRIPT=" ${BASH_SOURCE[0]} "
9
+
10
+ # The directory that this script is located in.
11
+ TOOL_DIR=` dirname " ${RELATIVE_PATH_TO_SCRIPT} " `
12
+
13
+ # The devtools root directory is assumed to be the parent of this directory.
14
+ DEVTOOLS_DIR=" ${TOOL_DIR} /.."
15
+
7
16
# Use the Flutter SDK from flutter-sdk/.
8
17
FLUTTER_DIR=" ` pwd` /flutter-sdk"
9
18
PATH=" $FLUTTER_DIR /bin" :$PATH
10
19
11
- REQUIRED_FLUTTER_VERSION=$( < " flutter-version.txt" )
20
+ REQUIRED_FLUTTER_VERSION=$( < " ${DEVTOOLS_DIR} / flutter-version.txt" )
12
21
13
22
flutter --version
14
23
ACTUAL_FLUTTER_VERSION=$( < " $FLUTTER_DIR /version" )
26
35
# echo on
27
36
set -ex
28
37
29
- pushd packages/devtools_app
38
+ if [[ $1 = " --update-perfetto" ]]; then
39
+ $TOOL_DIR /update_perfetto.sh
40
+ fi
41
+
42
+ pushd $DEVTOOLS_DIR /packages/devtools_app
30
43
31
44
flutter clean
32
45
rm -rf build/web
You can’t perform that action at this time.
0 commit comments