This reverts commit 5fd259be24.
This commit is contained in:
@@ -30,12 +30,14 @@ Future<void> main(List<String> arguments) async {
|
||||
final ArgParser argParser = ArgParser();
|
||||
argParser.addOption(
|
||||
'temp',
|
||||
defaultsTo: null,
|
||||
help: 'A location where temporary files may be written. Defaults to a '
|
||||
'directory in the system temp folder. If specified, will not be '
|
||||
'automatically removed at the end of execution.',
|
||||
);
|
||||
argParser.addFlag(
|
||||
'verbose',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Print verbose output for the analysis process.',
|
||||
);
|
||||
@@ -50,10 +52,12 @@ Future<void> main(List<String> arguments) async {
|
||||
argParser.addFlag(
|
||||
'include-dart-ui',
|
||||
defaultsTo: true,
|
||||
negatable: true,
|
||||
help: 'Includes the dart:ui code supplied by the engine in the analysis.',
|
||||
);
|
||||
argParser.addFlag(
|
||||
'help',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Print help for this command.',
|
||||
);
|
||||
@@ -65,6 +69,7 @@ Future<void> main(List<String> arguments) async {
|
||||
argParser.addFlag(
|
||||
'global-activate-snippets',
|
||||
defaultsTo: true,
|
||||
negatable: true,
|
||||
help: 'Whether or not to "pub global activate" the snippets package. If set, will '
|
||||
'activate version $_snippetsActivateVersion',
|
||||
);
|
||||
@@ -471,6 +476,7 @@ class SampleChecker {
|
||||
if (!Platform.environment.containsKey('FLUTTER_ROOT')) 'FLUTTER_ROOT': _flutterRoot,
|
||||
if (_flutterVersion!.isNotEmpty) 'FLUTTER_VERSION': _flutterVersion!,
|
||||
},
|
||||
includeParentEnvironment: true,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1149,7 +1155,7 @@ class Sample {
|
||||
final StringBuffer buf = StringBuffer('sample ${args.join(' ')}\n');
|
||||
int count = start.line;
|
||||
for (final String line in input) {
|
||||
buf.writeln(' ${count.toString().padLeft(4)}: $line');
|
||||
buf.writeln(' ${count.toString().padLeft(4, ' ')}: $line');
|
||||
count++;
|
||||
}
|
||||
return buf.toString();
|
||||
|
||||
@@ -94,6 +94,8 @@ class AppServer {
|
||||
debugPort: browserDebugPort,
|
||||
url: appUrl,
|
||||
userDataDirectory: userDataDirectory.path,
|
||||
windowHeight: 1024,
|
||||
windowWidth: 1024,
|
||||
), onError: chromeErrorCompleter.complete);
|
||||
return AppServer._(server, chrome, chromeErrorCompleter.future);
|
||||
}
|
||||
|
||||
@@ -687,6 +687,7 @@ class ArchivePublisher {
|
||||
try {
|
||||
await _runGsUtil(
|
||||
<String>['stat', cloudPath],
|
||||
failOk: false,
|
||||
);
|
||||
} on PreparePackageException {
|
||||
// `gsutil stat gs://path/to/file` will exit with 1 if file does not exist
|
||||
@@ -736,6 +737,7 @@ Future<void> main(List<String> rawArguments) async {
|
||||
final ArgParser argParser = ArgParser();
|
||||
argParser.addOption(
|
||||
'temp_dir',
|
||||
defaultsTo: null,
|
||||
help: 'A location where temporary files may be written. Defaults to a '
|
||||
'directory in the system temp folder. Will write a few GiB of data, '
|
||||
'so it should have sufficient free space. If a temp_dir is not '
|
||||
@@ -743,15 +745,18 @@ Future<void> main(List<String> rawArguments) async {
|
||||
'removed automatically.',
|
||||
);
|
||||
argParser.addOption('revision',
|
||||
defaultsTo: null,
|
||||
help: 'The Flutter git repo revision to build the '
|
||||
'archive with. Must be the full 40-character hash. Required.');
|
||||
argParser.addOption(
|
||||
'branch',
|
||||
defaultsTo: null,
|
||||
allowed: Branch.values.map<String>((Branch branch) => getBranchName(branch)),
|
||||
help: 'The Flutter branch to build the archive with. Required.',
|
||||
);
|
||||
argParser.addOption(
|
||||
'output',
|
||||
defaultsTo: null,
|
||||
help: 'The path to the directory where the output archive should be '
|
||||
'written. If --output is not specified, the archive will be written to '
|
||||
"the current directory. If the output directory doesn't exist, it, and "
|
||||
@@ -759,6 +764,7 @@ Future<void> main(List<String> rawArguments) async {
|
||||
);
|
||||
argParser.addFlag(
|
||||
'publish',
|
||||
defaultsTo: false,
|
||||
help: 'If set, will publish the archive to Google Cloud Storage upon '
|
||||
'successful creation of the archive. Will publish under this '
|
||||
'directory: $baseUrl$releaseFolder',
|
||||
@@ -766,15 +772,18 @@ Future<void> main(List<String> rawArguments) async {
|
||||
argParser.addFlag(
|
||||
'force',
|
||||
abbr: 'f',
|
||||
defaultsTo: false,
|
||||
help: 'Overwrite a previously uploaded package.',
|
||||
);
|
||||
argParser.addFlag(
|
||||
'dry_run',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Prints gsutil commands instead of executing them.',
|
||||
);
|
||||
argParser.addFlag(
|
||||
'help',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Print help for this command.',
|
||||
);
|
||||
|
||||
@@ -645,7 +645,7 @@ Future<void> _runFrameworkTests() async {
|
||||
|
||||
Future<void> runLibraries() async {
|
||||
final List<String> tests = Directory(path.join(flutterRoot, 'packages', 'flutter', 'test'))
|
||||
.listSync(followLinks: false)
|
||||
.listSync(followLinks: false, recursive: false)
|
||||
.whereType<Directory>()
|
||||
.where((Directory dir) => dir.path.endsWith('widgets') == false)
|
||||
.map<String>((Directory dir) => path.join('test', path.basename(dir.path)) + path.separator)
|
||||
@@ -1215,7 +1215,7 @@ Future<void> _ensureChromeDriverIsRunning() async {
|
||||
final Uri chromeDriverUrl = Uri.parse('http://localhost:4444/status');
|
||||
final HttpClientRequest request = await client.getUrl(chromeDriverUrl);
|
||||
final HttpClientResponse response = await request.close();
|
||||
final Map<String, dynamic> webDriverStatus = json.decode(await response.transform(utf8.decoder).join()) as Map<String, dynamic>;
|
||||
final Map<String, dynamic> webDriverStatus = json.decode(await response.transform(utf8.decoder).join('')) as Map<String, dynamic>;
|
||||
client.close();
|
||||
final bool webDriverReady = (webDriverStatus['value'] as Map<String, dynamic>)['ready'] as bool;
|
||||
if (!webDriverReady) {
|
||||
|
||||
@@ -193,6 +193,6 @@ void main() {
|
||||
const Hash256(0xA8100AE6AA1940D0, 0xB663BB31CD466142, 0xEBBDBD5187131B92, 0xD93818987832EB89), // sha256("\xff")
|
||||
const Hash256(0x155644D3F13D98BF, 0, 0, 0),
|
||||
},
|
||||
));
|
||||
), exitCode: 0);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -266,6 +266,7 @@ void main() {
|
||||
tempDir,
|
||||
testRef,
|
||||
Branch.dev,
|
||||
strict: true,
|
||||
processManager: processManager,
|
||||
subprocessOutput: false,
|
||||
platform: platform,
|
||||
@@ -494,7 +495,7 @@ void main() {
|
||||
'$gsutilCall -- stat $gsArchivePath': <ProcessResult>[ProcessResult(0, 0, '', '')],
|
||||
};
|
||||
processManager.addCommands(convertResults(calls));
|
||||
expect(() async => publisher.publishArchive(), throwsException);
|
||||
expect(() async => publisher.publishArchive(false), throwsException);
|
||||
});
|
||||
|
||||
test('publishArchive does not throw if forceUpload is true and artifact already exists on cloud storage', () async {
|
||||
|
||||
@@ -401,6 +401,7 @@ Future<void> main(List<String> rawArguments) async {
|
||||
final ArgParser argParser = ArgParser();
|
||||
argParser.addOption(
|
||||
'temp_dir',
|
||||
defaultsTo: null,
|
||||
help: 'A location where temporary files may be written. Defaults to a '
|
||||
'directory in the system temp folder. If a temp_dir is not '
|
||||
'specified, then by default a generated temporary directory will be '
|
||||
@@ -430,6 +431,7 @@ Future<void> main(List<String> rawArguments) async {
|
||||
);
|
||||
argParser.addFlag(
|
||||
'confirm',
|
||||
defaultsTo: false,
|
||||
help: 'If set, will actually remove the archive from Google Cloud Storage '
|
||||
'upon successful execution of this script. Published archives will be '
|
||||
'removed from this directory: $baseUrl$releaseFolder. This option '
|
||||
@@ -438,6 +440,7 @@ Future<void> main(List<String> rawArguments) async {
|
||||
);
|
||||
argParser.addFlag(
|
||||
'help',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Print help for this command.',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user