@@ -1 +1 @@
|
||||
47db6d73cfe3227129a510445dd82c45c2dbe347
|
||||
5de12cedfe6002b79183bc59af04561a98c8aa82
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export 'versions_command.dart';
|
||||
export 'rebase_command.dart';
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:io/io.dart';
|
||||
|
||||
/// Print the versions a given Shorebird or Flutter hash depends on.
|
||||
class VersionsCommand extends CutlerCommand {
|
||||
/// Constructs a new [VersionsCommand].
|
||||
/// Constructs a new [VersionsCommand] with a given [logger].
|
||||
VersionsCommand() {
|
||||
argParser.addOption(
|
||||
'repo',
|
||||
@@ -61,13 +61,8 @@ class VersionsCommand extends CutlerCommand {
|
||||
indent: 2,
|
||||
upstream: flutterVersions,
|
||||
);
|
||||
logger.info('Upstream');
|
||||
printVersions(
|
||||
checkouts,
|
||||
flutterVersions,
|
||||
indent: 2,
|
||||
trailingNewline: false,
|
||||
);
|
||||
logger.info('\nUpstream');
|
||||
printVersions(checkouts, flutterVersions, indent: 2);
|
||||
|
||||
return ExitCode.success.code;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ class Cutler extends CommandRunner<int> {
|
||||
/// Constructs a new [Cutler] command runner.
|
||||
Cutler() : super('cutler', 'A tool for maintaining forks of Flutter.') {
|
||||
addCommand(VersionsCommand());
|
||||
addCommand(RebaseCommand());
|
||||
|
||||
argParser
|
||||
..addFlag('verbose', abbr: 'v')
|
||||
|
||||
@@ -7,9 +7,7 @@ enum Repo {
|
||||
name: 'shorebird',
|
||||
path: '_shorebird/shorebird',
|
||||
url: 'https://github.com/shorebirdtech/shorebird.git',
|
||||
// TODO(eseidel): There is no upstream for Shorebird, this should be null.
|
||||
upstreamBranch: 'origin/main',
|
||||
directDependencies: [Repo.flutter],
|
||||
),
|
||||
|
||||
/// Repo configuration representing the Flutter repo.
|
||||
@@ -18,7 +16,6 @@ enum Repo {
|
||||
path: 'flutter',
|
||||
url: 'https://github.com/shorebirdtech/flutter.git',
|
||||
upstreamBranch: 'upstream/stable',
|
||||
directDependencies: [Repo.engine],
|
||||
),
|
||||
|
||||
/// Repo configuration representing the engine repo.
|
||||
@@ -27,7 +24,6 @@ enum Repo {
|
||||
path: 'engine/src/flutter',
|
||||
url: 'https://github.com/shorebirdtech/engine.git',
|
||||
upstreamBranch: 'upstream/master',
|
||||
directDependencies: [Repo.dart],
|
||||
),
|
||||
|
||||
/// Repo configuration representing the dart-lang/sdk repo.
|
||||
@@ -36,7 +32,6 @@ enum Repo {
|
||||
path: 'engine/src/third_party/dart',
|
||||
url: 'https://github.com/shorebirdtech/dart-sdk.git',
|
||||
upstreamBranch: 'upstream/master',
|
||||
directDependencies: [],
|
||||
),
|
||||
|
||||
/// Repo configuration representing the buildroot repo.
|
||||
@@ -45,7 +40,6 @@ enum Repo {
|
||||
path: 'engine/src',
|
||||
url: 'https://github.com/shorebirdtech/builddoor.git',
|
||||
upstreamBranch: 'upstream/master',
|
||||
directDependencies: [],
|
||||
);
|
||||
|
||||
const Repo({
|
||||
@@ -53,7 +47,6 @@ enum Repo {
|
||||
required this.path,
|
||||
required this.url,
|
||||
required this.upstreamBranch,
|
||||
required this.directDependencies,
|
||||
});
|
||||
|
||||
/// Returns the name (e.g. 'engine') of the repo.
|
||||
@@ -67,20 +60,6 @@ enum Repo {
|
||||
|
||||
/// Returns the name of the upstream branch.
|
||||
final String upstreamBranch;
|
||||
|
||||
/// Returns the direct dependencies of the repo.
|
||||
final List<Repo> directDependencies;
|
||||
|
||||
/// Returns the transitive dependencies of a given repo.
|
||||
Iterable<Repo> get dependencies {
|
||||
final deps = <Repo>{};
|
||||
for (final dep in directDependencies) {
|
||||
deps
|
||||
..add(dep)
|
||||
..addAll(dep.dependencies);
|
||||
}
|
||||
return deps;
|
||||
}
|
||||
}
|
||||
|
||||
/// Paths to version files in each repo.
|
||||
@@ -142,7 +121,6 @@ class Version {
|
||||
}
|
||||
|
||||
/// An object to hold a set of versions that make up a Flutter release.
|
||||
@immutable
|
||||
class VersionSet {
|
||||
/// Constructs a new [VersionSet] with a given [engine], [flutter], and
|
||||
/// [buildroot] version.
|
||||
@@ -187,18 +165,4 @@ class VersionSet {
|
||||
dart: dart ?? this.dart,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (other is! VersionSet) {
|
||||
return false;
|
||||
}
|
||||
return other.engine == engine &&
|
||||
other.flutter == flutter &&
|
||||
other.buildroot == buildroot &&
|
||||
other.dart == dart;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hashAll([engine, flutter, buildroot, dart]);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ void printVersions(
|
||||
VersionSet versions, {
|
||||
int indent = 0,
|
||||
VersionSet? upstream,
|
||||
bool trailingNewline = true,
|
||||
}) {
|
||||
final repos = [
|
||||
Repo.flutter,
|
||||
@@ -33,9 +32,6 @@ void printVersions(
|
||||
logger.info(string);
|
||||
}
|
||||
}
|
||||
if (trailingNewline) {
|
||||
logger.info('');
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a [VersionSet] for Flutter for a given [flutterHash].
|
||||
|
||||
Reference in New Issue
Block a user