forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
format.bat
32 lines (25 loc) · 1.24 KB
/
format.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@ECHO off
REM Copyright 2013 The Flutter Authors. All rights reserved.
REM Use of this source code is governed by a BSD-style license that can be
REM found in the LICENSE file.
REM ---------------------------------- NOTE ----------------------------------
REM
REM Please keep the logic in this file consistent with the logic in the
REM `format.sh` script in the same directory to ensure that it continues to
REM work across all platforms!
REM
REM --------------------------------------------------------------------------
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%i IN ("%~dp0..\..") DO SET SRC_DIR=%%~fi
REM Test if Git is available on the Host
where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
SET repo_dir=%SRC_DIR%\flutter
SET ci_dir=%repo_dir%\ci
SET dart_sdk_path=%SRC_DIR%\third_party\dart\tools\sdks\dart-sdk
SET dart=%dart_sdk_path%\bin\dart.exe
cd "%ci_dir%"
REM Do not use the CALL command in the next line to execute Dart. CALL causes
REM Windows to re-read the line from disk after the CALL command has finished
REM regardless of the ampersand chain.
REM TODO(gspencergoog): Remove --no-sound-null-safety once isolate package is null-safe.
"%dart%" --no-sound-null-safety --disable-dart-dev bin\format.dart %* & exit /B !ERRORLEVEL!