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
c49f07ee
Commit
c49f07ee
authored
Nov 11, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #314 from TheBosZ/master
Update to match Hixie's changed bash script
parents
769f9cb2
d263f474
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
flutter.bat
bin/flutter.bat
+14
-16
No files found.
bin/flutter.bat
View file @
c49f07ee
...
@@ -8,34 +8,32 @@ FOR %%i IN ("%~dp0..") DO SET "flutter_root=%%~fi" REM Get the parent directory
...
@@ -8,34 +8,32 @@ FOR %%i IN ("%~dp0..") DO SET "flutter_root=%%~fi" REM Get the parent directory
SET flutter_tools_dir=%flutter_root%\packages\flutter_tools
SET flutter_tools_dir=%flutter_root%\packages\flutter_tools
SET snapshot_path=%flutter_root%\bin\cache\flutter_tools.snapshot
SET snapshot_path=%flutter_root%\bin\cache\flutter_tools.snapshot
SET stamp_path=%flutter_root%\bin\cache\flutter_tools.stamp
SET stamp_path=%flutter_root%\bin\cache\flutter_tools.stamp
SET script_path=%flutter_tools_dir%\bin\
sky
_tools.dart
SET script_path=%flutter_tools_dir%\bin\
flutter
_tools.dart
REM TODO: Don't require dart to be on the user's path
REM TODO: Don't require dart to be on the user's path
SET dart=dart
SET dart=dart
REM Getting modified timestamps in a batch file is ... troublesome
REM More info: http://stackoverflow.com/questions/1687014/how-do-i-compare-timestamps-of-files-in-a-dos-batch-script
FOR %%f IN (%flutter_tools_dir%\pubspec.yaml) DO SET yamlt=%%~tf
FOR %%a IN (%flutter_tools_dir%\pubspec.lock) DO SET lockt=%%~ta
if !lockt! LSS !yamlt! (
CD "%flutter_tools_dir%"
CALL pub.bat get
CD "%flutter_root%"
IF EXIST %snapshot_path% DEL %snapshot_path%
)
REM IF doesn't have an "or". Instead, just use GOTO
REM IF doesn't have an "or". Instead, just use GOTO
FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
IF NOT EXIST %snapshot_path% GOTO do_snapshot
IF NOT EXIST %snapshot_path% GOTO do_snapshot
IF NOT EXIST %stamp_path% GOTO do_snapshot
IF NOT EXIST %stamp_path% GOTO do_snapshot
FOR /f %%r IN ('type "%stamp_path%"') DO SET stamp_value=%%r
FOR /f "delims=" %%x in (%stamp_path%) do set stamp_value=%%x
IF (!stamp_value! NEQ !revision!) GOTO do_snapshot
IF "!stamp_value!" NEQ "!revision!" GOTO do_snapshot
REM Getting modified timestamps in a batch file is ... troublesome
REM More info: http://stackoverflow.com/questions/1687014/how-do-i-compare-timestamps-of-files-in-a-dos-batch-script
FOR %%f IN (%flutter_tools_dir%\pubspec.yaml) DO SET yamlt=%%~tf
FOR %%a IN (%flutter_tools_dir%\pubspec.lock) DO SET lockt=%%~ta
IF !lockt! LSS !yamlt! GOTO do_snapshot
GOTO :after_snapshot
GOTO :after_snapshot
:do_snapshot
:do_snapshot
CD "%flutter_tools_dir%"
CALL pub.bat get
CD "%flutter_root%"
CALL %dart% --snapshot="%snapshot_path%" --package-root="%flutter_tools_dir%\packages" "%script_path%"
CALL %dart% --snapshot="%snapshot_path%" --package-root="%flutter_tools_dir%\packages" "%script_path%"
ECHO !revision! > "%stamp_path%"
<nul SET /p=%revision%> "%stamp_path%"
goto :eof
:after_snapshot
:after_snapshot
...
...
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