Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5f76bfb4
Unverified
Commit
5f76bfb4
authored
Sep 29, 2020
by
Marcus Tomlinson
Committed by
GitHub
Sep 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the ability to inject a bootstrap script (#66897)
parent
1d93be3d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
.gitignore
.gitignore
+2
-0
shared.bat
bin/internal/shared.bat
+6
-0
shared.sh
bin/internal/shared.sh
+6
-0
command_output_test.dart
...ter_tools/test/integration.shard/command_output_test.dart
+24
-0
No files found.
.gitignore
View file @
5f76bfb4
...
...
@@ -24,6 +24,8 @@
# Flutter repo-specific
/bin/cache/
/bin/internal/bootstrap.bat
/bin/internal/bootstrap.sh
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
...
...
bin/internal/shared.bat
View file @
5f76bfb4
...
...
@@ -61,6 +61,12 @@ IF NOT EXIST "%cache_dir%" (
GOTO :after_subroutine
:subroutine
REM If present, run the bootstrap script first
SET bootstrap_path=%FLUTTER_ROOT%\bin\internal\bootstrap.bat
IF EXIST "%bootstrap_path%" (
CALL "%bootstrap_path%"
)
PUSHD "%flutter_root%"
FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
POPD
...
...
bin/internal/shared.sh
View file @
5f76bfb4
...
...
@@ -166,6 +166,12 @@ function upgrade_flutter () (
function
shared::execute
()
{
export
FLUTTER_ROOT
=
"
$(
cd
"
${
BIN_DIR
}
/.."
;
pwd
-P
)
"
# If present, run the bootstrap script first
BOOTSTRAP_PATH
=
"
$FLUTTER_ROOT
/bin/internal/bootstrap.sh"
if
[
-f
"
$BOOTSTRAP_PATH
"
]
;
then
source
"
$BOOTSTRAP_PATH
"
fi
FLUTTER_TOOLS_DIR
=
"
$FLUTTER_ROOT
/packages/flutter_tools"
SNAPSHOT_PATH
=
"
$FLUTTER_ROOT
/bin/cache/flutter_tools.snapshot"
STAMP_PATH
=
"
$FLUTTER_ROOT
/bin/cache/flutter_tools.stamp"
...
...
packages/flutter_tools/test/integration.shard/command_output_test.dart
View file @
5f76bfb4
...
...
@@ -170,4 +170,28 @@ void main() {
expect
(
result
.
exitCode
,
1
);
expect
(
result
.
stderr
,
contains
(
'Invalid `--debug-uri`: http://127.0.0.1:3333*/'
));
});
testWithoutContext
(
'will load bootstrap script before starting'
,
()
async
{
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
);
final
File
bootstrap
=
fileSystem
.
file
(
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'internal'
,
platform
.
isWindows
?
'bootstrap.bat'
:
'bootstrap.sh'
));
try
{
bootstrap
.
writeAsStringSync
(
'echo TESTING 1 2 3'
);
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
]);
expect
(
result
.
stdout
,
contains
(
'TESTING 1 2 3'
));
}
finally
{
bootstrap
.
deleteSync
();
}
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment