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
1d59d8d3
Unverified
Commit
1d59d8d3
authored
Feb 04, 2022
by
Christopher Fujino
Committed by
GitHub
Feb 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] increment y instead of m when calling flutter --version on master (#97827)
parent
734c3c4f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
version.dart
packages/flutter_tools/lib/src/version.dart
+3
-1
version_test.dart
packages/flutter_tools/test/general.shard/version_test.dart
+3
-3
No files found.
packages/flutter_tools/lib/src/version.dart
View file @
1d59d8d3
...
@@ -736,7 +736,9 @@ class GitTagVersion {
...
@@ -736,7 +736,9 @@ class GitTagVersion {
return
'
$x
.
$y
.
$z
+hotfix.
${hotfix! + 1}
.pre.
$commits
'
;
return
'
$x
.
$y
.
$z
+hotfix.
${hotfix! + 1}
.pre.
$commits
'
;
}
}
if
(
devPatch
!=
null
&&
devVersion
!=
null
)
{
if
(
devPatch
!=
null
&&
devVersion
!=
null
)
{
return
'
$x
.
$y
.
$z
-
${devVersion! + 1}
.0.pre.
$commits
'
;
// The next published release this commit will appear in will be a beta
// release, thus increment [y].
return
'
$x
.
${y! + 1}
.0-0.0.pre.
$commits
'
;
}
}
return
'
$x
.
$y
.
${z! + 1}
-0.0.pre.
$commits
'
;
return
'
$x
.
$y
.
${z! + 1}
-0.0.pre.
$commits
'
;
}
}
...
...
packages/flutter_tools/test/general.shard/version_test.dart
View file @
1d59d8d3
...
@@ -372,7 +372,7 @@ void main() {
...
@@ -372,7 +372,7 @@ void main() {
// Master channel
// Master channel
gitTagVersion
=
GitTagVersion
.
parse
(
'1.2.3-4.5.pre-13-g
$hash
'
);
gitTagVersion
=
GitTagVersion
.
parse
(
'1.2.3-4.5.pre-13-g
$hash
'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
hash
),
'1.
2.3-5
.0.pre.13'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
hash
),
'1.
3.0-0
.0.pre.13'
);
expect
(
gitTagVersion
.
gitTag
,
'1.2.3-4.5.pre'
);
expect
(
gitTagVersion
.
gitTag
,
'1.2.3-4.5.pre'
);
expect
(
gitTagVersion
.
devVersion
,
4
);
expect
(
gitTagVersion
.
devVersion
,
4
);
expect
(
gitTagVersion
.
devPatch
,
5
);
expect
(
gitTagVersion
.
devPatch
,
5
);
...
@@ -491,8 +491,8 @@ void main() {
...
@@ -491,8 +491,8 @@ void main() {
logger:
BufferLogger
.
test
(),
logger:
BufferLogger
.
test
(),
);
);
final
GitTagVersion
gitTagVersion
=
GitTagVersion
.
determine
(
processUtils
,
workingDirectory:
'.'
);
final
GitTagVersion
gitTagVersion
=
GitTagVersion
.
determine
(
processUtils
,
workingDirectory:
'.'
);
// reported version should increment the
number after the dash
// reported version should increment the
y
expect
(
gitTagVersion
.
frameworkVersionFor
(
headRevision
),
'1.
2.3-3
.0.pre.12'
);
expect
(
gitTagVersion
.
frameworkVersionFor
(
headRevision
),
'1.
3.0-0
.0.pre.12'
);
});
});
testUsingContext
(
'determine does not call fetch --tags'
,
()
{
testUsingContext
(
'determine does not call fetch --tags'
,
()
{
...
...
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