[flutter_tools] use -f when fetching tags (#58703)
use -f to overwrite local tags on master branch
This commit is contained in:
@@ -749,7 +749,7 @@ class GitTagVersion {
|
||||
if (channel == 'dev' || channel == 'beta' || channel == 'stable') {
|
||||
globals.printTrace('Skipping request to fetchTags - on well known channel $channel.');
|
||||
} else {
|
||||
_runGit('git fetch $_flutterGit --tags', processUtils, workingDirectory);
|
||||
_runGit('git fetch $_flutterGit --tags -f', processUtils, workingDirectory);
|
||||
}
|
||||
}
|
||||
final List<String> tags = _runGit(
|
||||
|
||||
@@ -573,7 +573,7 @@ void main() {
|
||||
environment: anyNamed('environment'),
|
||||
)).thenReturn(RunResult(ProcessResult(108, 0, 'master', ''), <String>['git', 'fetch']));
|
||||
when(processUtils.runSync(
|
||||
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags'],
|
||||
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags', '-f'],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
environment: anyNamed('environment'),
|
||||
)).thenReturn(RunResult(ProcessResult(109, 0, '', ''), <String>['git', 'fetch']));
|
||||
@@ -599,7 +599,7 @@ void main() {
|
||||
environment: anyNamed('environment'),
|
||||
)).called(1);
|
||||
verify(processUtils.runSync(
|
||||
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags'],
|
||||
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags', '-f'],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
environment: anyNamed('environment'),
|
||||
)).called(1);
|
||||
|
||||
Reference in New Issue
Block a user