Skip to content
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 fixes
  • Loading branch information
stuartmorgan-g committed Mar 4, 2024
commit 32f2101bbbddb7107bcc0db5297dd30059cb77cc
8 changes: 4 additions & 4 deletions script/tool/lib/src/publish_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PublishCommand extends PackageLoopingCommand {
_stdin = stdinput ?? io.stdin {
argParser.addFlag(_alreadyTaggedFlag,
help:
'Instead of tagging, validates that the current checkout is aleardy tagged with the expected version.\n'
'Instead of tagging, validates that the current checkout is already tagged with the expected version.\n'
'This is primarily intended for use in CI publish steps triggered by tagging.',
negatable: false);
argParser.addMultiOption(_pubFlagsOption,
Expand Down Expand Up @@ -88,7 +88,7 @@ class PublishCommand extends PackageLoopingCommand {
argParser.addFlag(_skipConfirmationFlag,
help: 'Run the command without asking for Y/N inputs.\n'
'This command will add a `--force` flag to the `pub publish` command if it is not added with $_pubFlagsOption\n');
argParser.addFlag(_tagForAutopublishFlag,
argParser.addFlag(_tagForAutoPublishFlag,
help:
'Runs the dry-run publish, and tags if it succeeds, but does not actually publish.\n'
'This is intended for use with a separate publish step that is based on tag push events.',
Expand All @@ -101,7 +101,7 @@ class PublishCommand extends PackageLoopingCommand {
static const String _allChangedFlag = 'all-changed';
static const String _dryRunFlag = 'dry-run';
static const String _skipConfirmationFlag = 'skip-confirmation';
static const String _tagForAutopublishFlag = 'tag-for-autopublish';
static const String _tagForAutoPublishFlag = 'tag-for-auto-publish';

static const String _pubCredentialName = 'PUB_CREDENTIALS';

Expand Down Expand Up @@ -205,7 +205,7 @@ class PublishCommand extends PackageLoopingCommand {
return PackageResult.fail(<String>['uncommitted changes']);
}

final bool tagOnly = getBoolArg(_tagForAutopublishFlag);
final bool tagOnly = getBoolArg(_tagForAutoPublishFlag);
if (!tagOnly) {
if (!await _publish(package)) {
return PackageResult.fail(<String>['publish failed']);
Expand Down
12 changes: 6 additions & 6 deletions script/tool/test/publish_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,15 @@ void main() {
);
});

test('skips publish with --tag-for-autopublish', () async {
test('skips publish with --tag-for-auto-publish', () async {
const String packageName = 'a_package';
createFakePackage(packageName, packagesDir);

final List<String> output =
await runCapturingPrint(commandRunner, <String>[
'publish',
'--packages=$packageName',
'--tag-for-autopublish',
'--tag-for-auto-publish',
]);

// There should be no variant of any command containing "publish".
Expand Down Expand Up @@ -418,12 +418,12 @@ void main() {
const ProcessCall('git-tag', <String>['foo-v0.0.1'], null))));
});

test('when passed --tag-for-autopublish', () async {
test('when passed --tag-for-auto-publish', () async {
createFakePlugin('foo', packagesDir, examples: <String>[]);
await runCapturingPrint(commandRunner, <String>[
'publish',
'--packages=foo',
'--tag-for-autopublish',
'--tag-for-auto-publish',
]);

expect(processRunner.recordedCalls,
Expand Down Expand Up @@ -478,13 +478,13 @@ void main() {
]));
});

test('when passed --tag-for-autopublish', () async {
test('when passed --tag-for-auto-publish', () async {
createFakePlugin('foo', packagesDir, examples: <String>[]);
await runCapturingPrint(commandRunner, <String>[
'publish',
'--packages=foo',
'--skip-confirmation',
'--tag-for-autopublish',
'--tag-for-auto-publish',
]);

expect(
Expand Down