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
9455fb64
Commit
9455fb64
authored
Apr 14, 2017
by
Jason Simmons
Committed by
GitHub
Apr 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow upgrades and version checks against the alpha branch (#9387)
Fixes
https://github.com/flutter/flutter/issues/9258
parent
9493df2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
upgrade.dart
packages/flutter_tools/lib/src/commands/upgrade.dart
+0
-6
version.dart
packages/flutter_tools/lib/src/version.dart
+5
-4
No files found.
packages/flutter_tools/lib/src/commands/upgrade.dart
View file @
9455fb64
...
...
@@ -36,12 +36,6 @@ class UpgradeCommand extends FlutterCommand {
}
final
FlutterVersion
flutterVersion
=
FlutterVersion
.
instance
;
if
(
flutterVersion
.
channel
==
'alpha'
)
{
// The alpha branch is deprecated. Rather than trying to pull the alpha
// branch, we should switch upstream to master.
printStatus
(
'Switching to from alpha to master...'
);
runSync
(<
String
>[
'git'
,
'branch'
,
'--set-upstream-to=origin/master'
]);
}
printStatus
(
'Upgrading Flutter from
${Cache.flutterRoot}
...'
);
...
...
packages/flutter_tools/lib/src/version.dart
View file @
9455fb64
...
...
@@ -107,7 +107,7 @@ class FlutterVersion {
///
/// Throws [ToolExit] if a git command fails, for example, when the remote git
/// repository is not reachable due to a network issue.
static
Future
<
String
>
fetchRemoteFrameworkCommitDate
()
async
{
static
Future
<
String
>
fetchRemoteFrameworkCommitDate
(
String
branch
)
async
{
await
_removeVersionCheckRemoteIfExists
();
try
{
await
_run
(<
String
>[
...
...
@@ -117,8 +117,8 @@ class FlutterVersion {
_kVersionCheckRemote
,
'https://github.com/flutter/flutter.git'
,
]);
await
_run
(<
String
>[
'git'
,
'fetch'
,
_kVersionCheckRemote
,
'master'
]);
return
_latestGitCommitDate
(
'
$_kVersionCheckRemote
/
master
'
);
await
_run
(<
String
>[
'git'
,
'fetch'
,
_kVersionCheckRemote
,
branch
]);
return
_latestGitCommitDate
(
'
$_kVersionCheckRemote
/
$branch
'
);
}
finally
{
await
_removeVersionCheckRemoteIfExists
();
}
...
...
@@ -243,7 +243,8 @@ class FlutterVersion {
// Cache is empty or it's been a while since the last server ping. Ping the server.
try
{
final
DateTime
remoteFrameworkCommitDate
=
DateTime
.
parse
(
await
FlutterVersion
.
fetchRemoteFrameworkCommitDate
());
final
String
branch
=
_channel
==
'alpha'
?
'alpha'
:
'master'
;
final
DateTime
remoteFrameworkCommitDate
=
DateTime
.
parse
(
await
FlutterVersion
.
fetchRemoteFrameworkCommitDate
(
branch
));
versionCheckStamp
.
store
(
newTimeVersionWasChecked:
_clock
.
now
(),
newKnownRemoteVersion:
remoteFrameworkCommitDate
,
...
...
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