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
c428c825
Commit
c428c825
authored
Nov 12, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #331 from abarth/flutter_upgrade
Add a `flutter upgrade` command
parents
3f58d9b7
90991854
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
executable.dart
packages/flutter_tools/lib/executable.dart
+3
-1
upgrade.dart
packages/flutter_tools/lib/src/commands/upgrade.dart
+30
-0
No files found.
packages/flutter_tools/lib/executable.dart
View file @
c428c825
...
...
@@ -23,6 +23,7 @@ import 'src/commands/start.dart';
import
'src/commands/stop.dart'
;
import
'src/commands/test.dart'
;
import
'src/commands/trace.dart'
;
import
'src/commands/upgrade.dart'
;
import
'src/process.dart'
;
/// Main entry point for commands.
...
...
@@ -57,7 +58,8 @@ Future main(List<String> args) async {
..
addCommand
(
new
StartCommand
())
..
addCommand
(
new
StopCommand
())
..
addCommand
(
new
TestCommand
())
..
addCommand
(
new
TraceCommand
());
..
addCommand
(
new
TraceCommand
())
..
addCommand
(
new
UpgradeCommand
());
return
Chain
.
capture
(()
async
{
dynamic
result
=
await
runner
.
run
(
args
);
...
...
packages/flutter_tools/lib/src/commands/upgrade.dart
0 → 100644
View file @
c428c825
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:logging/logging.dart'
;
import
'../artifacts.dart'
;
import
'../process.dart'
;
import
'flutter_command.dart'
;
final
Logger
_logging
=
new
Logger
(
'flutter_tools.upgrade'
);
class
UpgradeCommand
extends
FlutterCommand
{
final
String
name
=
'upgrade'
;
final
String
description
=
'Upgrade your copy of Flutter.'
;
@override
Future
<
int
>
runInProject
()
async
{
int
code
=
await
runCommandAndStreamOutput
([
'git'
,
'pull'
,
'--ff-only'
],
workingDirectory:
ArtifactStore
.
flutterRoot
);
if
(
code
!=
0
)
return
code
;
return
await
runCommandAndStreamOutput
([
sdkBinaryName
(
'pub'
),
'upgrade'
]);
}
}
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