Commit 7ab48f4e authored by Devon Carew's avatar Devon Carew Committed by GitHub

tweak the --version text (#5420)

parent 2259c59b
...@@ -202,9 +202,10 @@ class _FlutterValidator extends DoctorValidator { ...@@ -202,9 +202,10 @@ class _FlutterValidator extends DoctorValidator {
messages.add(new ValidationMessage('Flutter at ${version.flutterRoot}')); messages.add(new ValidationMessage('Flutter at ${version.flutterRoot}'));
messages.add(new ValidationMessage( messages.add(new ValidationMessage(
'Framework revision ${version.frameworkRevisionShort} ' 'Framework revision ${version.frameworkRevisionShort} '
'(${version.frameworkAge}), ' '(${version.frameworkAge}), ${version.frameworkDate}'
'engine revision ${version.engineRevisionShort}'
)); ));
messages.add(new ValidationMessage('Engine revision ${version.engineRevisionShort}'));
messages.add(new ValidationMessage('Tools Dart version ${version.dartSdkVersion}'));
if (Platform.isWindows) { if (Platform.isWindows) {
valid = ValidationType.missing; valid = ValidationType.missing;
......
...@@ -48,6 +48,8 @@ class FlutterVersion { ...@@ -48,6 +48,8 @@ class FlutterVersion {
String _frameworkAge; String _frameworkAge;
String get frameworkAge => _frameworkAge; String get frameworkAge => _frameworkAge;
String get frameworkDate => frameworkCommitDate;
String get dartSdkVersion => Cache.dartSdkVersion.split(' ')[0]; String get dartSdkVersion => Cache.dartSdkVersion.split(' ')[0];
String get engineRevision => Cache.engineRevision; String get engineRevision => Cache.engineRevision;
...@@ -57,12 +59,17 @@ class FlutterVersion { ...@@ -57,12 +59,17 @@ class FlutterVersion {
@override @override
String toString() { String toString() {
String from = 'Flutter on channel $channel (from ${repositoryUrl == null ? 'unknown source' : repositoryUrl})'; String flutterText = 'Flutter • channel $channel${repositoryUrl == null ? 'unknown source' : repositoryUrl}';
String flutterText = 'Framework revision $frameworkRevisionShort ($frameworkAge); engine revision $engineRevisionShort'; String frameworkText = 'Framework • revision $frameworkRevisionShort ($frameworkAge) • $frameworkCommitDate';
String dartSdkText = 'Flutter tools using Dart version $dartSdkVersion'; String engineText = 'Engine • revision $engineRevisionShort';
String frameworkCommit = 'Last commit on framework: $frameworkCommitDate'; String toolsText = 'Tools • Dart $dartSdkVersion';
// Flutter • channel master • https://github.com/flutter/flutter.git
// Framework • revision 2259c59be8 • 19 minutes ago • 2016-08-15 22:51:40
// Engine • revision fe509b0d96
// Tools • Dart 1.19.0-dev.5.0
return '$from\n$flutterText\n$frameworkCommit\n$dartSdkText'; return '$flutterText\n$frameworkText\n$engineText\n$toolsText';
} }
/// A date String describing the last framework commit. /// A date String describing the last framework commit.
......
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