From 1aa7ecf5ce5803c732c7107e488eadd66c720b90 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Mon, 2 Oct 2023 16:36:44 -0500 Subject: [PATCH] chore(shorebird_cli): remove `--channel` option from `patch` and `preview` commands (#1342) --- .../lib/src/commands/patch/patch_android_command.dart | 7 +------ .../lib/src/commands/patch/patch_ios_command.dart | 7 +------ .../shorebird_cli/lib/src/commands/preview_command.dart | 7 +------ .../src/commands/patch/patch_android_command_test.dart | 2 +- .../test/src/commands/patch/patch_ios_command_test.dart | 2 +- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/packages/shorebird_cli/lib/src/commands/patch/patch_android_command.dart b/packages/shorebird_cli/lib/src/commands/patch/patch_android_command.dart index 75315b6df..ca20509f3 100644 --- a/packages/shorebird_cli/lib/src/commands/patch/patch_android_command.dart +++ b/packages/shorebird_cli/lib/src/commands/patch/patch_android_command.dart @@ -49,11 +49,6 @@ class PatchAndroidCommand extends ShorebirdCommand 'flavor', help: 'The product flavor to use when building the app.', ) - ..addOption( - 'channel', - help: 'The channel to publish the patch to.', - defaultsTo: 'stable', - ) ..addFlag( 'force', abbr: 'f', @@ -102,7 +97,7 @@ class PatchAndroidCommand extends ShorebirdCommand await cache.updateAll(); const platform = ReleasePlatform.android; - final channelName = results['channel'] as String; + const channelName = 'stable'; final flavor = results['flavor'] as String?; final target = results['target'] as String?; 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 85efac102..7031ab648 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 @@ -42,11 +42,6 @@ class PatchIosCommand extends ShorebirdCommand 'flavor', help: 'The product flavor to use when building the app.', ) - ..addOption( - 'channel', - help: 'The channel to publish the patch to.', - defaultsTo: 'stable', - ) ..addFlag( 'codesign', help: 'Codesign the application bundle.', @@ -100,7 +95,7 @@ class PatchIosCommand extends ShorebirdCommand } const arch = 'aarch64'; - final channelName = results['channel'] as String; + const channelName = 'stable'; const releasePlatform = ReleasePlatform.ios; final flavor = results['flavor'] as String?; diff --git a/packages/shorebird_cli/lib/src/commands/preview_command.dart b/packages/shorebird_cli/lib/src/commands/preview_command.dart index f2bedb78b..e7b599bee 100644 --- a/packages/shorebird_cli/lib/src/commands/preview_command.dart +++ b/packages/shorebird_cli/lib/src/commands/preview_command.dart @@ -52,11 +52,6 @@ class PreviewCommand extends ShorebirdCommand { ReleasePlatform.ios.name: 'iOS', }, help: 'The platform of the release.', - ) - ..addOption( - 'channel', - defaultsTo: 'stable', - help: 'The channel to preview the release for.', ); } @@ -111,7 +106,7 @@ class PreviewCommand extends ShorebirdCommand { ); final deviceId = results['device-id'] as String?; - final channel = results['channel'] as String; + const channel = 'stable'; return switch (platform) { ReleasePlatform.android => installAndLaunchAndroid( diff --git a/packages/shorebird_cli/test/src/commands/patch/patch_android_command_test.dart b/packages/shorebird_cli/test/src/commands/patch/patch_android_command_test.dart index 9f5f323aa..1ceb8148d 100644 --- a/packages/shorebird_cli/test/src/commands/patch/patch_android_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/patch/patch_android_command_test.dart @@ -42,7 +42,7 @@ void main() { const version = '$versionName+$versionCode'; const arch = 'aarch64'; const releasePlatform = ReleasePlatform.android; - const channelName = 'test-channel'; + const channelName = 'stable'; const appDisplayName = 'Test App'; final appMetadata = AppMetadata( appId: appId, 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 c5d38d526..f4ed59d45 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 @@ -38,7 +38,7 @@ void main() { const versionCode = '1'; const version = '$versionName+$versionCode'; const arch = 'aarch64'; - const channelName = 'test-channel'; + const channelName = 'stable'; const appDisplayName = 'Test App'; const releasePlatform = ReleasePlatform.ios; const platformName = 'ios';