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 55import 'dart:io' ;
66
77const argDevToolsBuild = 'devtools-build' ;
8+ const argUpdatePerfetto = '--update-perfetto' ;
89
910void main (List <String > args) async {
11+ final shouldUpdatePerfetto = args.contains (argUpdatePerfetto);
12+
1013 final mainDevToolsDirectory = Directory .current;
1114 if (! mainDevToolsDirectory.path.endsWith ('/devtools' )) {
1215 throw Exception ('Please execute this script from your top level '
@@ -23,7 +26,9 @@ void main(List<String> args) async {
2326 print ('Running the build_release.sh script...' );
2427 final buildProcess = await Process .start (
2528 './tool/build_release.sh' ,
26- [],
29+ [
30+ if (shouldUpdatePerfetto) argUpdatePerfetto,
31+ ],
2732 workingDirectory: mainDevToolsDirectory.path,
2833 );
2934 _forwardOutputStreams (buildProcess);
Original file line number Diff line number Diff line change 44# Use of this source code is governed by a BSD-style license that can be
55# found in the LICENSE file.
66
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+
716# Use the Flutter SDK from flutter-sdk/.
817FLUTTER_DIR=" ` pwd` /flutter-sdk"
918PATH=" $FLUTTER_DIR /bin" :$PATH
1019
11- REQUIRED_FLUTTER_VERSION=$( < " flutter-version.txt" )
20+ REQUIRED_FLUTTER_VERSION=$( < " ${DEVTOOLS_DIR} / flutter-version.txt" )
1221
1322flutter --version
1423ACTUAL_FLUTTER_VERSION=$( < " $FLUTTER_DIR /version" )
2635# echo on
2736set -ex
2837
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
3043
3144flutter clean
3245rm -rf build/web
You can’t perform that action at this time.
0 commit comments