Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
review
  • Loading branch information
Chris Yang committed Apr 30, 2021
commit b54688b91a019d4c7089f6d0145c11712e4cf9c3
10 changes: 4 additions & 6 deletions script/tool/lib/src/publish_plugin_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class PublishPluginCommand extends PluginCommand {
}
if (packagesFailed.isNotEmpty) {
_print(
'Packages failed to release: ${packagesFailed.join(', ')}, see above for details.');
'Failed to release the following packages: ${packagesFailed.join(', ')}, see above for details.');
}
return packagesFailed.isEmpty;
}
Expand Down Expand Up @@ -247,7 +247,7 @@ class PublishPluginCommand extends PluginCommand {
return true;
}

// Returns `true` if needs to release the version, `false` if needs to skip
// Returns a [_CheckNeedsReleaseResult] that indicates the result.
Future<_CheckNeedsReleaseResult> _checkNeedsRelease({
@required File pubspecFile,
@required GitVersionFinder gitVersionFinder,
Expand All @@ -267,9 +267,7 @@ Safe to ignore if the package is deleted in this commit.
}

if (pubspec.version == null) {
_print('No version found. A package that '
'intentionally has no version should be marked '
'"publish_to: none".');
_print('No version found. A package that intentionally has no version should be marked "publish_to: none"');
return _CheckNeedsReleaseResult.failure;
}

Expand Down Expand Up @@ -484,6 +482,6 @@ enum _CheckNeedsReleaseResult {
// The package does not need to be released.
noRelease,

// There's an error when trying to access if the package needs to be released.
// There's an error when trying to determine whether the package needs to be released.
failure,
}
10 changes: 5 additions & 5 deletions script/tool/test/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ Directory createFakePlugin(
final Directory exampleDir = pluginDirectory.childDirectory('example')
..createSync();
createFakePubspec(exampleDir,
name: '${name}_example', isFlutter: isFlutter, includeVersion: false, publish_to: 'none');
name: '${name}_example', isFlutter: isFlutter, includeVersion: false, publishTo: 'none');
} else if (withExamples.isNotEmpty) {
final Directory exampleDir = pluginDirectory.childDirectory('example')
..createSync();
for (final String example in withExamples) {
final Directory currentExample = exampleDir.childDirectory(example)
..createSync();
createFakePubspec(currentExample, name: example, isFlutter: isFlutter, includeVersion: false, publish_to: 'none');
createFakePubspec(currentExample, name: example, isFlutter: isFlutter, includeVersion: false, publishTo: 'none');
}
}

Expand Down Expand Up @@ -125,7 +125,7 @@ void createFakePubspec(
bool isLinuxPlugin = false,
bool isMacOsPlugin = false,
bool isWindowsPlugin = false,
String publish_to = 'http://no_pub_server.com',
String publishTo = 'http://no_pub_server.com',
String version = '0.0.1',
}) {
parent.childFile('pubspec.yaml').createSync();
Expand Down Expand Up @@ -185,9 +185,9 @@ dependencies:
version: $version
''';
}
if (publish_to.isNotEmpty) {
if (publishTo.isNotEmpty) {
yaml += '''
publish_to: $publish_to # Hardcoded safeguard to prevent this from somehow being published by a broken test.
publish_to: $publishTo # Hardcoded safeguard to prevent this from somehow being published by a broken test.
''';
}
parent.childFile('pubspec.yaml').writeAsStringSync(yaml);
Expand Down