Add the ability to inject a bootstrap script (#66897)

This commit is contained in:
Marcus Tomlinson
2020-09-29 19:24:21 +01:00
committed by GitHub
parent 1d93be3d3d
commit 5f76bfb4af
4 changed files with 38 additions and 0 deletions

View File

@@ -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

View File

@@ -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"