Let the packaging recipe use gsutil.py (#26402)

This commit is contained in:
xster 2019-01-10 19:08:03 -08:00 committed by GitHub
parent d4d1b29a35
commit 5a434c61af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -534,7 +534,7 @@ class ArchivePublisher {
bool failOk = false,
}) async {
return _processRunner.runProcess(
<String>['gsutil']..addAll(args),
<String>['gsutil.py', '--']..addAll(args),
workingDirectory: workingDirectory,
failOk: failOk,
);
@ -561,7 +561,7 @@ class ArchivePublisher {
args.addAll(<String>['-h', 'Content-Type:$mimeType']);
}
args.addAll(<String>['cp', src, dest]);
return _runGsUtil(args);
return await _runGsUtil(args);
}
}

View File

@ -257,11 +257,11 @@ void main() {
''';
File(jsonPath).writeAsStringSync(releasesJson);
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
'gsutil rm $gsArchivePath': null,
'gsutil -h Content-Type:$archiveMime cp $archivePath $gsArchivePath': null,
'gsutil cp $gsJsonPath $jsonPath': null,
'gsutil rm $gsJsonPath': null,
'gsutil -h Content-Type:application/json cp $jsonPath $gsJsonPath': null,
'gsutil.py -- rm $gsArchivePath': null,
'gsutil.py -- -h Content-Type:$archiveMime cp $archivePath $gsArchivePath': null,
'gsutil.py -- cp $gsJsonPath $jsonPath': null,
'gsutil.py -- rm $gsJsonPath': null,
'gsutil.py -- -h Content-Type:application/json cp $jsonPath $gsJsonPath': null,
};
processManager.fakeResults = calls;
final File outputFile = File(path.join(tempDir.absolute.path, archiveName));