From 3633ccd88282549c91bfd1dca3732a2918e2681e Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Tue, 17 Jun 2025 10:50:33 -0500 Subject: [PATCH] chore(shorebird_cli): v1.6.46 (#3177) --- RELEASE_NOTES.md | 4 ++++ .../lib/src/commands/create.dart | 3 +++ packages/shorebird_cli/lib/src/version.dart | 2 +- packages/shorebird_cli/pubspec.yaml | 2 +- .../test/src/commands/create_test.dart | 19 +++++++++++++++++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 574c1f0e..6fb30e9d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,6 +4,10 @@ cspell:words pubspec erickzanardo xcframeworks Cupertino codesign codecov rkishan appbundle proto tlsv --> +## 1.6.46 (June 17, 2025) + +- ✨ Add new `shorebird create` command + ## 1.6.45 (June 16, 2025) - 🐦 Support for Flutter 3.32.4 diff --git a/packages/shorebird_cli/lib/src/commands/create.dart b/packages/shorebird_cli/lib/src/commands/create.dart index 59743675..3f1e3e0b 100644 --- a/packages/shorebird_cli/lib/src/commands/create.dart +++ b/packages/shorebird_cli/lib/src/commands/create.dart @@ -25,6 +25,9 @@ class CreateCommand extends ShorebirdProxyCommand { ...results.rest, ]); if (createExitCode != ExitCode.success.code) return createExitCode; + if (results.rest.contains('-h') || results.rest.contains('--help')) { + return createExitCode; + } return runScoped( () => runner!.run(['init']), values: { diff --git a/packages/shorebird_cli/lib/src/version.dart b/packages/shorebird_cli/lib/src/version.dart index 66d8825f..43fe8fd3 100644 --- a/packages/shorebird_cli/lib/src/version.dart +++ b/packages/shorebird_cli/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '1.6.45'; +const packageVersion = '1.6.46'; diff --git a/packages/shorebird_cli/pubspec.yaml b/packages/shorebird_cli/pubspec.yaml index ed54ce6a..8dfb1d28 100644 --- a/packages/shorebird_cli/pubspec.yaml +++ b/packages/shorebird_cli/pubspec.yaml @@ -1,6 +1,6 @@ name: shorebird_cli description: Command-line tool to interact with Shorebird's services. -version: 1.6.45 +version: 1.6.46 repository: https://github.com/shorebirdtech/shorebird resolution: workspace diff --git a/packages/shorebird_cli/test/src/commands/create_test.dart b/packages/shorebird_cli/test/src/commands/create_test.dart index 46efa250..77e3cdba 100644 --- a/packages/shorebird_cli/test/src/commands/create_test.dart +++ b/packages/shorebird_cli/test/src/commands/create_test.dart @@ -76,6 +76,25 @@ void main() { verify(() => runner.run(['init'])).called(1); }); + group('when passing --help', () { + setUp(() { + when(() => argResults.rest).thenReturn(['--help']); + when( + () => process.stream('flutter', ['create', '--help']), + ).thenAnswer((_) async => ExitCode.success.code); + }); + + test('only runs flutter create', () async { + await expectLater( + runWithOverrides(command.run), + completion(equals(ExitCode.success.code)), + ); + + verify(() => process.stream('flutter', ['create', '--help'])).called(1); + verifyNever(() => runner.run(any())); + }); + }); + group('when flutter create fails', () { setUp(() { when(