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
eb996afa
Unverified
Commit
eb996afa
authored
May 07, 2019
by
Jonah Williams
Committed by
GitHub
May 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make hotfix use a plus instead of minus (#32060)
parent
2f1e7cf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
version.dart
packages/flutter_tools/lib/src/version.dart
+4
-4
version_test.dart
packages/flutter_tools/test/version_test.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/version.dart
View file @
eb996afa
...
...
@@ -572,7 +572,7 @@ class GitTagVersion {
/// The Z in vX.Y.Z.
final
int
z
;
/// the F in vX.Y.Z
-
hotfix.F
/// the F in vX.Y.Z
+
hotfix.F
final
int
hotfix
;
/// Number of commits since the vX.Y.Z tag.
...
...
@@ -586,7 +586,7 @@ class GitTagVersion {
}
static
GitTagVersion
parse
(
String
version
)
{
final
RegExp
versionPattern
=
RegExp
(
r'^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:
-
hotfix\.([0-9]+))?-([0-9]+)-g([a-f0-9]+)$'
);
final
RegExp
versionPattern
=
RegExp
(
r'^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:
\+
hotfix\.([0-9]+))?-([0-9]+)-g([a-f0-9]+)$'
);
final
List
<
String
>
parts
=
versionPattern
.
matchAsPrefix
(
version
)?.
groups
(<
int
>[
1
,
2
,
3
,
4
,
5
,
6
]);
if
(
parts
==
null
)
{
printTrace
(
'Could not interpret results of "git describe":
$version
'
);
...
...
@@ -601,11 +601,11 @@ class GitTagVersion {
return
'0.0.0-unknown'
;
if
(
commits
==
0
)
{
if
(
hotfix
!=
null
)
return
'
$x
.
$y
.
$z
-
hotfix.
$hotfix
'
;
return
'
$x
.
$y
.
$z
+
hotfix.
$hotfix
'
;
return
'
$x
.
$y
.
$z
'
;
}
if
(
hotfix
!=
null
)
return
'
$x
.
$y
.
$z
-
hotfix.
${hotfix + 1}
-pre.
$commits
'
;
return
'
$x
.
$y
.
$z
+
hotfix.
${hotfix + 1}
-pre.
$commits
'
;
return
'
$x
.
$y
.
${z + 1}
-pre.
$commits
'
;
}
}
...
...
packages/flutter_tools/test/version_test.dart
View file @
eb996afa
...
...
@@ -394,8 +394,8 @@ void main() {
expect
(
GitTagVersion
.
parse
(
'v1.2.3-4-g
$hash
'
).
frameworkVersionFor
(
hash
),
'1.2.4-pre.4'
);
expect
(
GitTagVersion
.
parse
(
'v98.76.54-32-g
$hash
'
).
frameworkVersionFor
(
hash
),
'98.76.55-pre.32'
);
expect
(
GitTagVersion
.
parse
(
'v10.20.30-0-g
$hash
'
).
frameworkVersionFor
(
hash
),
'10.20.30'
);
expect
(
GitTagVersion
.
parse
(
'v1.2.3
-hotfix.1-4-g
$hash
'
).
frameworkVersionFor
(
hash
),
'1.2.3-
hotfix.2-pre.4'
);
expect
(
GitTagVersion
.
parse
(
'v7.2.4
-hotfix.8-0-g
$hash
'
).
frameworkVersionFor
(
hash
),
'7.2.4-
hotfix.8'
);
expect
(
GitTagVersion
.
parse
(
'v1.2.3
+hotfix.1-4-g
$hash
'
).
frameworkVersionFor
(
hash
),
'1.2.3+
hotfix.2-pre.4'
);
expect
(
GitTagVersion
.
parse
(
'v7.2.4
+hotfix.8-0-g
$hash
'
).
frameworkVersionFor
(
hash
),
'7.2.4+
hotfix.8'
);
expect
(
testLogger
.
traceText
,
''
);
expect
(
GitTagVersion
.
parse
(
'x1.2.3-4-g
$hash
'
).
frameworkVersionFor
(
hash
),
'0.0.0-unknown'
);
expect
(
GitTagVersion
.
parse
(
'v1.0.0-unknown-0-g
$hash
'
).
frameworkVersionFor
(
hash
),
'0.0.0-unknown'
);
...
...
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