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
a029e172
Unverified
Commit
a029e172
authored
Sep 21, 2020
by
Jonah Williams
Committed by
GitHub
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] fix bug where last build id parent folder is missing (#66156)
parent
c2e91ad4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
build_system.dart
...ages/flutter_tools/lib/src/build_system/build_system.dart
+1
-1
build_system_test.dart
...ls/test/general.shard/build_system/build_system_test.dart
+20
-0
No files found.
packages/flutter_tools/lib/src/build_system/build_system.dart
View file @
a029e172
...
...
@@ -668,6 +668,7 @@ class FlutterBuildSystem extends BuildSystem {
final
String
currentBuildId
=
fileSystem
.
path
.
basename
(
environment
.
buildDir
.
path
);
final
File
lastBuildIdFile
=
environment
.
outputDir
.
childFile
(
'.last_build_id'
);
if
(!
lastBuildIdFile
.
existsSync
())
{
lastBuildIdFile
.
parent
.
createSync
(
recursive:
true
);
lastBuildIdFile
.
writeAsStringSync
(
currentBuildId
);
// No config file, either output was cleaned or this is the first build.
return
;
...
...
@@ -704,7 +705,6 @@ class FlutterBuildSystem extends BuildSystem {
}
}
/// An active instance of a build.
class
_BuildInstance
{
_BuildInstance
({
...
...
packages/flutter_tools/test/general.shard/build_system/build_system_test.dart
View file @
a029e172
...
...
@@ -475,6 +475,26 @@ void main() {
'6666cd76f96956469e7be39d750cc7d9'
);
});
testWithoutContext
(
'trackSharedBuildDirectory handles a missing output dir'
,
()
{
final
Environment
environment
=
Environment
.
test
(
fileSystem
.
currentDirectory
,
outputDir:
fileSystem
.
directory
(
'a/b/c/d'
),
artifacts:
MockArtifacts
(),
processManager:
FakeProcessManager
.
any
(),
fileSystem:
fileSystem
,
logger:
BufferLogger
.
test
(),
);
FlutterBuildSystem
(
fileSystem:
fileSystem
,
logger:
BufferLogger
.
test
(),
platform:
FakePlatform
(),
).
trackSharedBuildDirectory
(
environment
,
fileSystem
,
<
String
,
File
>{});
expect
(
environment
.
outputDir
.
childFile
(
'.last_build_id'
),
exists
);
expect
(
environment
.
outputDir
.
childFile
(
'.last_build_id'
).
readAsStringSync
(),
'5954e2278dd01e1c4e747578776eeb94'
);
});
testWithoutContext
(
'trackSharedBuildDirectory does not modify .last_build_id when config is identical'
,
()
{
environment
.
outputDir
.
childFile
(
'.last_build_id'
)
..
writeAsStringSync
(
'6666cd76f96956469e7be39d750cc7d9'
)
...
...
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