Unverified Commit 65fd924d authored by Casey Hillers's avatar Casey Hillers Committed by GitHub

[conductor] Remove CiYaml model (#120458)

* [conductor] Remove CiYaml model

* Remove package:yaml

* Update pubspec checksum
parent 52ab2993
......@@ -10,7 +10,6 @@ import 'package:file/file.dart';
import 'package:meta/meta.dart';
import 'package:platform/platform.dart';
import 'package:process/process.dart';
import 'package:yaml/yaml.dart';
import './git.dart';
import './globals.dart';
......@@ -599,12 +598,6 @@ class FrameworkRepository extends Repository {
static const String defaultUpstream = 'git@github.com:flutter/flutter.git';
static const String defaultBranch = 'master';
Future<CiYaml> get ciYaml async {
final CiYaml ciYaml =
CiYaml((await checkoutDirectory).childFile('.ci.yaml'));
return ciYaml;
}
Future<String> get cacheDirectory async {
return fileSystem.path.join(
(await checkoutDirectory).path,
......@@ -857,11 +850,6 @@ class EngineRepository extends Repository {
final Checkouts checkouts;
Future<CiYaml> get ciYaml async {
final CiYaml ciYaml = CiYaml((await checkoutDirectory).childFile('.ci.yaml'));
return ciYaml;
}
static const String defaultUpstream = 'git@github.com:flutter/engine.git';
static const String defaultBranch = 'main';
......@@ -930,26 +918,3 @@ class Checkouts {
final ProcessManager processManager;
final Stdio stdio;
}
class CiYaml {
CiYaml(this.file) {
if (!file.existsSync()) {
throw ConductorException('Could not find the .ci.yaml file at ${file.path}');
}
}
/// Underlying [File] that this object wraps.
final File file;
/// Returns the raw string contents of this file.
///
/// This is not cached as the contents can be written to while the conductor
/// is running.
String get stringContents => file.readAsStringSync();
/// Returns the parsed contents of the file as a [YamlMap].
///
/// This is not cached as the contents can be written to while the conductor
/// is running.
YamlMap get contents => loadYaml(stringContents) as YamlMap;
}
......@@ -15,7 +15,6 @@ dependencies:
path: 1.8.3
process: 4.2.4
protobuf: 2.1.0
yaml: 3.1.1
async: 2.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
......@@ -65,4 +64,4 @@ dev_dependencies:
web_socket_channel: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: f01f
# PUBSPEC CHECKSUM: 721e
......@@ -393,15 +393,6 @@ vars = {
expect(didUpdate, false);
});
test('CiYaml(file) will throw if file does not exist', () {
final File file = fileSystem.file('/non/existent/file.txt');
expect(
() => CiYaml(file),
throwsExceptionWith('Could not find the .ci.yaml file at /non/existent/file.txt'),
);
});
test('framework repo set as localUpstream ensures requiredLocalBranches exist locally', () async {
const String commit = 'deadbeef';
const String candidateBranch = 'flutter-1.2-candidate.3';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment