[flutter_plugin_tools] ignore flutter_plugin_tools when publishing (#4110)

This commit is contained in:
Chris Yang
2021-06-28 09:06:03 -07:00
committed by GitHub
parent fef8e6c2fb
commit 355ffc0a88
2 changed files with 59 additions and 0 deletions

View File

@ -290,6 +290,14 @@ Safe to ignore if the package is deleted in this commit.
}
final Pubspec pubspec = Pubspec.parse(pubspecFile.readAsStringSync());
if (pubspec.name == 'flutter_plugin_tools') {
// Ignore flutter_plugin_tools package when running publishing through flutter_plugin_tools.
// TODO(cyanglaz): Make the tool also auto publish flutter_plugin_tools package.
// https://github.com/flutter/flutter/issues/85430
return _CheckNeedsReleaseResult.noRelease;
}
if (pubspec.publishTo == 'none') {
return _CheckNeedsReleaseResult.noRelease;
}