Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
864b7f47
Commit
864b7f47
authored
Jan 29, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the engine revision to --version
parent
1b75de1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+0
-1
upgrade.dart
packages/flutter_tools/lib/src/commands/upgrade.dart
+16
-1
version.dart
packages/flutter_tools/lib/src/runner/version.dart
+9
-1
No files found.
packages/flutter_tools/lib/src/artifacts.dart
View file @
864b7f47
...
...
@@ -204,7 +204,6 @@ class ArtifactStore {
static
String
get
engineRevision
{
if
(
_engineRevision
==
null
)
{
ensurePackageRootIsValid
();
File
revisionFile
=
new
File
(
path
.
join
(
packageRoot
,
'sky_engine'
,
'REVISION'
));
if
(
revisionFile
.
existsSync
())
_engineRevision
=
revisionFile
.
readAsStringSync
();
...
...
packages/flutter_tools/lib/src/commands/upgrade.dart
View file @
864b7f47
...
...
@@ -8,6 +8,7 @@ import '../artifacts.dart';
import
'../base/context.dart'
;
import
'../base/process.dart'
;
import
'../runner/flutter_command.dart'
;
import
'../runner/version.dart'
;
class
UpgradeCommand
extends
FlutterCommand
{
final
String
name
=
'upgrade'
;
...
...
@@ -15,6 +16,8 @@ class UpgradeCommand extends FlutterCommand {
@override
Future
<
int
>
runInProject
()
async
{
printStatus
(
getVersion
(
ArtifactStore
.
flutterRoot
));
try
{
runCheckedSync
(<
String
>[
'git'
,
'rev-parse'
,
'@{u}'
...
...
@@ -24,6 +27,9 @@ class UpgradeCommand extends FlutterCommand {
return
1
;
}
printStatus
(
''
);
printStatus
(
'Upgrading Flutter...'
);
int
code
=
await
runCommandAndStreamOutput
(<
String
>[
'git'
,
'pull'
,
'--ff-only'
],
workingDirectory:
ArtifactStore
.
flutterRoot
);
...
...
@@ -31,6 +37,15 @@ class UpgradeCommand extends FlutterCommand {
if
(
code
!=
0
)
return
code
;
return
await
runCommandAndStreamOutput
([
sdkBinaryName
(
'pub'
),
'upgrade'
]);
printStatus
(
''
);
code
=
await
runCommandAndStreamOutput
([
sdkBinaryName
(
'pub'
),
'upgrade'
]);
if
(
code
!=
0
)
return
code
;
printStatus
(
''
);
printStatus
(
getVersion
(
ArtifactStore
.
flutterRoot
));
return
0
;
}
}
packages/flutter_tools/lib/src/runner/version.dart
View file @
864b7f47
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'../artifacts.dart'
;
import
'../base/process.dart'
;
String
getVersion
(
String
flutterRoot
)
{
...
...
@@ -20,5 +21,12 @@ String getVersion(String flutterRoot) {
String
revision
=
runSync
([
'git'
,
'log'
,
'-n'
,
'1'
,
'--pretty=format:%H (%ar)'
],
workingDirectory:
flutterRoot
).
trim
();
return
'Flutter
\n
Repository:
$repository
\n
Branch:
$upstream
\n
Revision:
$revision
'
;
String
version
=
'Flutter from
$repository
(on
$upstream
)
\n
flutter revision:
$revision
'
;
String
engineRevision
=
ArtifactStore
.
engineRevision
;
if
(
engineRevision
!=
null
)
version
+=
'
\n
engine revision :
$engineRevision
'
;
return
version
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment