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
f26dd373
Unverified
Commit
f26dd373
authored
Oct 17, 2022
by
Casey Hillers
Committed by
GitHub
Oct 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[packaging] Run git gc to minimize .git disk footprint (#113467)
parent
bc70ae0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
prepare_package.dart
dev/bots/prepare_package.dart
+3
-0
prepare_package_test.dart
dev/bots/test/prepare_package_test.dart
+5
-0
No files found.
dev/bots/prepare_package.dart
View file @
f26dd373
...
@@ -418,6 +418,9 @@ class ArchiveCreator {
...
@@ -418,6 +418,9 @@ class ArchiveCreator {
// Make the origin point to github instead of the chromium mirror.
// Make the origin point to github instead of the chromium mirror.
await
_runGit
(<
String
>[
'remote'
,
'set-url'
,
'origin'
,
githubRepo
]);
await
_runGit
(<
String
>[
'remote'
,
'set-url'
,
'origin'
,
githubRepo
]);
// Minify `.git` footprint (saving about ~100 MB as of Oct 2022)
await
_runGit
(<
String
>[
'gc'
,
'--prune=now'
,
'--aggressive'
]);
}
}
/// Retrieve the MinGit executable from storage and unpack it.
/// Retrieve the MinGit executable from storage and unpack it.
...
...
dev/bots/test/prepare_package_test.dart
View file @
f26dd373
...
@@ -126,6 +126,7 @@ void main() {
...
@@ -126,6 +126,7 @@ void main() {
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git gc --prune=now --aggressive'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'
$flutter
--version --machine'
:
<
ProcessResult
>[
'
$flutter
--version --machine'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
...
@@ -162,6 +163,7 @@ void main() {
...
@@ -162,6 +163,7 @@ void main() {
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git gc --prune=now --aggressive'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'
$flutter
--version --machine'
:
<
ProcessResult
>[
'
$flutter
--version --machine'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
...
@@ -209,6 +211,7 @@ void main() {
...
@@ -209,6 +211,7 @@ void main() {
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git gc --prune=now --aggressive'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'
$flutter
--version --machine'
:
<
ProcessResult
>[
'
$flutter
--version --machine'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
...
@@ -266,6 +269,7 @@ void main() {
...
@@ -266,6 +269,7 @@ void main() {
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git gc --prune=now --aggressive'
:
null
,
'git describe --tags --abbrev=0
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --abbrev=0
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'
$flutter
--version --machine'
:
<
ProcessResult
>[
'
$flutter
--version --machine'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
...
@@ -315,6 +319,7 @@ void main() {
...
@@ -315,6 +319,7 @@ void main() {
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git gc --prune=now --aggressive'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'
$flutter
--version --machine'
:
<
ProcessResult
>[
'
$flutter
--version --machine'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
...
...
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