From 9420b2b9fcfc928bec00598db7f2af0258b10062 Mon Sep 17 00:00:00 2001 From: Yegor Jbanov Date: Thu, 18 Aug 2016 16:28:23 -0700 Subject: [PATCH] kill obsolete logic for preserving local modifications In the past we didn't have a way to run individual tasks at current revision of Flutter. Now we do `dart agent.dart run [options]`. --- agent/lib/src/utils.dart | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/agent/lib/src/utils.dart b/agent/lib/src/utils.dart index 0bafc358a7..0773e257b8 100644 --- a/agent/lib/src/utils.dart +++ b/agent/lib/src/utils.dart @@ -361,24 +361,10 @@ String jsonEncode(dynamic data) { return new JsonEncoder.withIndent(' ').convert(data) + '\n'; } -Future getFlutter(String revision) async { +Future getFlutter(String revision) async { section('Get Flutter!'); - if (exists(dir('${config.flutterDirectory.path}/.git'))) { - bool hasLocalChanges = await inDirectory(config.flutterDirectory, () async { - String unstagedChanges = await eval('git', ['diff', '--numstat']); - String stagedChanges = await eval('git', ['diff', '--numstat', '--cached']); - return unstagedChanges.trim().isNotEmpty || stagedChanges.trim().isNotEmpty; - }); - - if (hasLocalChanges) { - section('WARNING'); - print( - 'Pending changes detected in the local Flutter repo. Will skip syncing ' - 'Flutter repo. The build will continue but it will marked as failed.' - ); - return false; - } + if (exists(config.flutterDirectory)) { rrm(config.flutterDirectory); } @@ -397,7 +383,6 @@ Future getFlutter(String revision) async { section('flutter update-packages'); await flutter('update-packages'); - return true; } void checkNotNull(Object o1, [Object o2 = 1, Object o3 = 1, Object o4 = 1,