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
c9cd825f
Unverified
Commit
c9cd825f
authored
Aug 05, 2020
by
Chris Yang
Committed by
GitHub
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] flutter version reports picks up release versions (#63019)
parent
ca660aad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
version.dart
packages/flutter_tools/lib/src/version.dart
+2
-2
version_test.dart
...tter_tools/test/commands.shard/hermetic/version_test.dart
+1
-1
upgrade_test.dart
...ter_tools/test/commands.shard/permeable/upgrade_test.dart
+1
-1
flutter_command_runner_test.dart
...est/general.shard/runner/flutter_command_runner_test.dart
+1
-1
version_test.dart
packages/flutter_tools/test/general.shard/version_test.dart
+12
-12
No files found.
packages/flutter_tools/lib/src/version.dart
View file @
c9cd825f
...
...
@@ -783,7 +783,7 @@ class GitTagVersion {
// recent tag and number of commits past.
return
parse
(
_runGit
(
'git describe --match *.*.*
-*.*.pre
--first-parent --long --tags'
,
'git describe --match *.*.* --first-parent --long --tags'
,
processUtils
,
workingDirectory
,
)
...
...
@@ -858,7 +858,7 @@ class GitTagVersion {
if
(
devPatch
!=
null
&&
devVersion
!=
null
)
{
return
'
$x
.
$y
.
$z
-
${devVersion + 1}
.0.pre.
$commits
'
;
}
return
'
$x
.
$y
.
${z + 1}
.pre.
$commits
'
;
return
'
$x
.
$y
.
${z + 1}
-0.0
.pre.
$commits
'
;
}
}
...
...
packages/flutter_tools/test/commands.shard/hermetic/version_test.dart
View file @
c9cd825f
...
...
@@ -280,7 +280,7 @@ class MockProcessManager extends Mock implements ProcessManager {
return
ProcessResult
(
0
,
0
,
'000000000000000000000'
,
''
);
}
if
(
commandStr
==
'git describe --match *.*.*
-*.*.pre
--first-parent --long --tags'
)
{
'git describe --match *.*.* --first-parent --long --tags'
)
{
if
(
version
.
isNotEmpty
)
{
return
ProcessResult
(
0
,
0
,
'
$version
-0-g00000000'
,
''
);
}
...
...
packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart
View file @
c9cd825f
...
...
@@ -329,7 +329,7 @@ void main() {
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
,
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
,
],
stdout:
'v1.12.16-19-gb45b676af'
,
),
...
...
packages/flutter_tools/test/general.shard/runner/flutter_command_runner_test.dart
View file @
c9cd825f
...
...
@@ -187,7 +187,7 @@ void main() {
workingDirectory:
Cache
.
flutterRoot
)).
thenReturn
(
result
);
when
(
processManager
.
runSync
(
'git tag --contains HEAD'
.
split
(
' '
),
workingDirectory:
Cache
.
flutterRoot
)).
thenReturn
(
result
);
when
(
processManager
.
runSync
(
'git describe --match *.*.*
-*.*.pre
--first-parent --long --tags'
.
split
(
' '
),
when
(
processManager
.
runSync
(
'git describe --match *.*.* --first-parent --long --tags'
.
split
(
' '
),
workingDirectory:
Cache
.
flutterRoot
)).
thenReturn
(
result
);
when
(
processManager
.
runSync
(
FlutterVersion
.
gitLog
(
'-n 1 --pretty=format:%ad --date=iso'
.
split
(
' '
)),
workingDirectory:
Cache
.
flutterRoot
)).
thenReturn
(
result
);
...
...
packages/flutter_tools/test/general.shard/version_test.dart
View file @
c9cd825f
...
...
@@ -419,7 +419,7 @@ void main() {
expect
(
gitTagVersion
.
devPatch
,
5
);
gitTagVersion
=
GitTagVersion
.
parse
(
'1.2.3-13-g
$hash
'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
hash
),
'1.2.4.pre.13'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
hash
),
'1.2.4
-0.0
.pre.13'
);
expect
(
gitTagVersion
.
gitTag
,
'1.2.3'
);
expect
(
gitTagVersion
.
devVersion
,
null
);
expect
(
gitTagVersion
.
devPatch
,
null
);
...
...
@@ -433,12 +433,12 @@ void main() {
// new tag release format, stable channel
gitTagVersion
=
GitTagVersion
.
parse
(
'1.2.3-13-g
$hash
'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
hash
),
'1.2.4.pre.13'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
hash
),
'1.2.4
-0.0
.pre.13'
);
expect
(
gitTagVersion
.
gitTag
,
'1.2.3'
);
expect
(
gitTagVersion
.
devVersion
,
null
);
expect
(
gitTagVersion
.
devPatch
,
null
);
expect
(
GitTagVersion
.
parse
(
'98.76.54-32-g
$hash
'
).
frameworkVersionFor
(
hash
),
'98.76.55.pre.32'
);
expect
(
GitTagVersion
.
parse
(
'98.76.54-32-g
$hash
'
).
frameworkVersionFor
(
hash
),
'98.76.55
-0.0
.pre.32'
);
expect
(
GitTagVersion
.
parse
(
'10.20.30-0-g
$hash
'
).
frameworkVersionFor
(
hash
),
'10.20.30'
);
expect
(
testLogger
.
traceText
,
''
);
expect
(
GitTagVersion
.
parse
(
'v1.2.3+hotfix.1-4-g
$hash
'
).
frameworkVersionFor
(
hash
),
'0.0.0-unknown'
);
...
...
@@ -475,7 +475,7 @@ void main() {
// We shouldn't have to fallback to git describe, because we are exactly
// on a release tag.
verifyNever
(
mockProcessUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
));
...
...
@@ -489,7 +489,7 @@ void main() {
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
RunResult
(
ProcessResult
(
105
,
0
,
''
,
''
),
<
String
>[
'git'
,
'fetch'
]));
when
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
RunResult
(
ProcessResult
(
106
,
0
,
'v0.1.2-3-1234abcd'
,
''
),
<
String
>[
'git'
,
'describe'
]));
...
...
@@ -515,7 +515,7 @@ void main() {
environment:
anyNamed
(
'environment'
),
));
verify
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
called
(
1
);
...
...
@@ -534,7 +534,7 @@ void main() {
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
RunResult
(
ProcessResult
(
106
,
0
,
''
,
''
),
<
String
>[
'git'
,
'fetch'
]));
when
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
RunResult
(
ProcessResult
(
107
,
0
,
'v0.1.2-3-1234abcd'
,
''
),
<
String
>[
'git'
,
'describe'
]));
...
...
@@ -560,7 +560,7 @@ void main() {
environment:
anyNamed
(
'environment'
),
));
verify
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
called
(
1
);
...
...
@@ -587,7 +587,7 @@ void main() {
<
String
>[
'git'
,
'tag'
,
'--contains'
,
'HEAD'
],
));
when
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
RunResult
(
ProcessResult
(
111
,
0
,
'v0.1.2-3-1234abcd'
,
''
),
<
String
>[
'git'
,
'describe'
]));
...
...
@@ -605,7 +605,7 @@ void main() {
environment:
anyNamed
(
'environment'
),
)).
called
(
1
);
verify
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
called
(
1
);
...
...
@@ -632,7 +632,7 @@ void main() {
<
String
>[
'git'
,
'tag'
,
'--contains'
,
'HEAD'
],
));
when
(
processUtils
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
RunResult
(
ProcessResult
(
111
,
0
,
'v0.1.2-3-1234abcd'
,
''
),
<
String
>[
'git'
,
'describe'
]));
...
...
@@ -770,7 +770,7 @@ void fakeData(
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
ProcessResult
(
106
,
0
,
''
,
''
));
when
(
pm
.
runSync
(
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*
-*.*.pre
'
,
'--first-parent'
,
'--long'
,
'--tags'
],
<
String
>[
'git'
,
'describe'
,
'--match'
,
'*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
)).
thenReturn
(
ProcessResult
(
107
,
0
,
'v0.1.2-3-1234abcd'
,
''
));
...
...
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