diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index 6226ff484c..627352fbf6 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -370,6 +370,12 @@ class ArchiveCreator { await _runGit(['clean', '-f', '-X', '**/.packages']); /// Remove package_config files and any contents in .dart_tool await _runGit(['clean', '-f', '-X', '**/.dart_tool']); + /// Remove git subfolder from .pub-cache, this contains the flutter goldens + /// and new flutter_gallery. + final Directory gitCache = Directory(path.join(flutterRoot.absolute.path, '.pub-cache', 'git')); + if (gitCache.existsSync()) { + gitCache.deleteSync(recursive: true); + } } /// Write the archive to the given output file.