From 12bb74cdc25aa85031f29323a7b20e15042392ec Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 9 Jun 2023 16:35:08 -0400 Subject: [PATCH] chore(shorebird_cli): hide ios commands (#623) --- .../lib/src/commands/patch/patch_ios_command.dart | 5 ++++- .../lib/src/commands/release/release_ios_command.dart | 5 ++++- .../test/src/commands/patch/patch_ios_command_test.dart | 4 ++++ .../test/src/commands/release/release_ios_command_test.dart | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/shorebird_cli/lib/src/commands/patch/patch_ios_command.dart b/packages/shorebird_cli/lib/src/commands/patch/patch_ios_command.dart index 4aa84e03..36e238a3 100644 --- a/packages/shorebird_cli/lib/src/commands/patch/patch_ios_command.dart +++ b/packages/shorebird_cli/lib/src/commands/patch/patch_ios_command.dart @@ -59,7 +59,10 @@ class PatchIosCommand extends ShorebirdCommand } @override - String get name => 'ios-preview'; + bool get hidden => true; + + @override + String get name => 'ios'; @override String get description => diff --git a/packages/shorebird_cli/lib/src/commands/release/release_ios_command.dart b/packages/shorebird_cli/lib/src/commands/release/release_ios_command.dart index 6d3634df..1a3fed89 100644 --- a/packages/shorebird_cli/lib/src/commands/release/release_ios_command.dart +++ b/packages/shorebird_cli/lib/src/commands/release/release_ios_command.dart @@ -39,6 +39,9 @@ class ReleaseIosCommand extends ShorebirdCommand final IpaReader _ipaReader; + @override + bool get hidden => true; + @override String get description => ''' Builds and submits your iOS app to Shorebird. @@ -47,7 +50,7 @@ make smaller updates to your app. '''; @override - String get name => 'ios-preview'; + String get name => 'ios'; @override Future run() async { diff --git a/packages/shorebird_cli/test/src/commands/patch/patch_ios_command_test.dart b/packages/shorebird_cli/test/src/commands/patch/patch_ios_command_test.dart index e57e6c82..661cdc92 100644 --- a/packages/shorebird_cli/test/src/commands/patch/patch_ios_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/patch/patch_ios_command_test.dart @@ -217,6 +217,10 @@ flutter: expect(command.description, isNotEmpty); }); + test('is hidden', () { + expect(command.hidden, isTrue); + }); + test('throws no user error when user is not logged in', () async { when(() => auth.isAuthenticated).thenReturn(false); final tempDir = setUpTempDir(); diff --git a/packages/shorebird_cli/test/src/commands/release/release_ios_command_test.dart b/packages/shorebird_cli/test/src/commands/release/release_ios_command_test.dart index fd82c8e6..99654133 100644 --- a/packages/shorebird_cli/test/src/commands/release/release_ios_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/release/release_ios_command_test.dart @@ -203,6 +203,10 @@ flutter: expect(command.description, isNotEmpty); }); + test('is hidden', () { + expect(command.hidden, isTrue); + }); + test('throws config error when shorebird is not initialized', () async { final tempDir = Directory.systemTemp.createTempSync(); final exitCode = await IOOverrides.runZoned(