mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[packaging] Run git gc to minimize .git disk footprint (#113467)
This commit is contained in:
parent
bc70ae0f57
commit
f26dd3730d
@ -418,6 +418,9 @@ class ArchiveCreator {
|
||||
|
||||
// Make the origin point to github instead of the chromium mirror.
|
||||
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.
|
||||
|
@ -126,6 +126,7 @@ void main() {
|
||||
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter': null,
|
||||
'git reset --hard $testRef': 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', '')],
|
||||
'$flutter --version --machine': <ProcessResult>[
|
||||
ProcessResult(0, 0, '{"dartSdkVersion": "3.2.1"}', ''),
|
||||
@ -162,6 +163,7 @@ void main() {
|
||||
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter': null,
|
||||
'git reset --hard $testRef': 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', '')],
|
||||
'$flutter --version --machine': <ProcessResult>[
|
||||
ProcessResult(0, 0, '{"dartSdkVersion": "3.2.1"}', ''),
|
||||
@ -209,6 +211,7 @@ void main() {
|
||||
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter': null,
|
||||
'git reset --hard $testRef': 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', '')],
|
||||
'$flutter --version --machine': <ProcessResult>[
|
||||
ProcessResult(0, 0, '{"dartSdkVersion": "3.2.1"}', ''),
|
||||
@ -266,6 +269,7 @@ void main() {
|
||||
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter': null,
|
||||
'git reset --hard $testRef': 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', '')],
|
||||
'$flutter --version --machine': <ProcessResult>[
|
||||
ProcessResult(0, 0, '{"dartSdkVersion": "3.2.1"}', ''),
|
||||
@ -315,6 +319,7 @@ void main() {
|
||||
'git clone -b beta https://flutter.googlesource.com/mirrors/flutter': null,
|
||||
'git reset --hard $testRef': 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', '')],
|
||||
'$flutter --version --machine': <ProcessResult>[
|
||||
ProcessResult(0, 0, '{"dartSdkVersion": "3.2.1"}', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user