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
697547c3
Unverified
Commit
697547c3
authored
Feb 27, 2021
by
Christopher Fujino
Committed by
GitHub
Feb 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix prepare package (#76898)
parent
24bf6b81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
prepare_package.dart
dev/bots/prepare_package.dart
+22
-2
prepare_package_test.dart
dev/bots/test/prepare_package_test.dart
+9
-6
No files found.
dev/bots/prepare_package.dart
View file @
697547c3
...
...
@@ -370,9 +370,29 @@ class ArchiveCreator {
// Yes, we could just skip all .packages files when constructing
// the archive, but some are checked in, and we don't want to skip
// those.
await
_runGit
(<
String
>[
'clean'
,
'-f'
,
'-X'
,
'**/.packages'
]);
await
_runGit
(<
String
>[
'clean'
,
'-f'
,
// Do not -X as it could lead to entire bin/cache getting cleaned
'-x'
,
'--'
,
'**/.packages'
,
]);
/// Remove package_config files and any contents in .dart_tool
await
_runGit
(<
String
>[
'clean'
,
'-f'
,
'-X'
,
'**/.dart_tool'
]);
await
_runGit
(<
String
>[
'clean'
,
'-f'
,
'-x'
,
'--'
,
'**/.dart_tool/'
,
]);
// Ensure the above commands do not clean out the cache
final
Directory
flutterCache
=
Directory
(
path
.
join
(
flutterRoot
.
absolute
.
path
,
'bin'
,
'cache'
));
if
(!
flutterCache
.
existsSync
())
{
throw
Exception
(
'The flutter cache was not found at
${flutterCache.path}
!'
);
}
/// Remove git subfolder from .pub-cache, this contains the flutter goldens
/// and new flutter_gallery.
final
Directory
gitCache
=
Directory
(
path
.
join
(
flutterRoot
.
absolute
.
path
,
'.pub-cache'
,
'git'
));
...
...
dev/bots/test/prepare_package_test.dart
View file @
697547c3
...
...
@@ -70,6 +70,7 @@ void main() {
ArchiveCreator
creator
;
Directory
tempDir
;
Directory
flutterDir
;
Directory
cacheDir
;
FakeProcessManager
processManager
;
final
List
<
List
<
String
>>
args
=
<
List
<
String
>>[];
final
List
<
Map
<
Symbol
,
dynamic
>>
namedArgs
=
<
Map
<
Symbol
,
dynamic
>>[];
...
...
@@ -86,6 +87,8 @@ void main() {
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_prepage_package_test.'
);
flutterDir
=
Directory
(
path
.
join
(
tempDir
.
path
,
'flutter'
));
flutterDir
.
createSync
(
recursive:
true
);
cacheDir
=
Directory
(
path
.
join
(
flutterDir
.
path
,
'bin'
,
'cache'
));
cacheDir
.
createSync
(
recursive:
true
);
creator
=
ArchiveCreator
(
tempDir
,
tempDir
,
...
...
@@ -120,8 +123,8 @@ void main() {
'
$flutter
create --template=app
${createBase}
app'
:
null
,
'
$flutter
create --template=package
${createBase}
package'
:
null
,
'
$flutter
create --template=plugin
${createBase}
plugin'
:
null
,
'git clean -f -
X
**/.packages'
:
null
,
'git clean -f -
X **/.dart_tool
'
:
null
,
'git clean -f -
x --
**/.packages'
:
null
,
'git clean -f -
x -- **/.dart_tool/
'
:
null
,
if
(
platform
.
isWindows
)
'attrib -h .git'
:
null
,
if
(
platform
.
isWindows
)
'7za a -tzip -mx=9
$archiveName
flutter'
:
null
else
if
(
platform
.
isMacOS
)
'zip -r -9
$archiveName
flutter'
:
null
...
...
@@ -156,8 +159,8 @@ void main() {
'
$flutter
create --template=app
${createBase}
app'
:
null
,
'
$flutter
create --template=package
${createBase}
package'
:
null
,
'
$flutter
create --template=plugin
${createBase}
plugin'
:
null
,
'git clean -f -
X
**/.packages'
:
null
,
'git clean -f -
X **/.dart_tool
'
:
null
,
'git clean -f -
x --
**/.packages'
:
null
,
'git clean -f -
x -- **/.dart_tool/
'
:
null
,
if
(
platform
.
isWindows
)
'attrib -h .git'
:
null
,
if
(
platform
.
isWindows
)
'7za a -tzip -mx=9
$archiveName
flutter'
:
null
else
if
(
platform
.
isMacOS
)
'zip -r -9
$archiveName
flutter'
:
null
...
...
@@ -206,8 +209,8 @@ void main() {
'
$flutter
create --template=app
${createBase}
app'
:
null
,
'
$flutter
create --template=package
${createBase}
package'
:
null
,
'
$flutter
create --template=plugin
${createBase}
plugin'
:
null
,
'git clean -f -
X
**/.packages'
:
null
,
'git clean -f -
X **/.dart_tool
'
:
null
,
'git clean -f -
x --
**/.packages'
:
null
,
'git clean -f -
x -- **/.dart_tool/
'
:
null
,
if
(
platform
.
isWindows
)
'attrib -h .git'
:
null
,
if
(
platform
.
isWindows
)
'7za a -tzip -mx=9
$archiveName
flutter'
:
null
else
if
(
platform
.
isMacOS
)
'zip -r -9
$archiveName
flutter'
:
null
...
...
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