From f4bb9133c56de5fbc905bf5667fbefcb4cceee20 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Thu, 1 Feb 2024 10:56:56 -0600 Subject: [PATCH] chore(shorebird_cli)!: remove `alpha` suffix from `ios` commands (#1680) --- .../lib/src/commands/patch/patch_ios_command.dart | 7 +++++-- .../commands/patch/patch_ios_framework_command.dart | 5 ++++- .../lib/src/commands/release/release_ios_command.dart | 11 +++++++---- .../release/release_ios_framework_command.dart | 9 ++++++--- .../lib/src/shorebird_artifact_mixin.dart | 8 ++++---- .../shorebird_cli/test/fixtures/xcarchives/README.md | 2 +- .../test/fixtures/xcframeworks/README.md | 2 +- .../src/commands/patch/patch_ios_command_test.dart | 4 ++++ .../patch/patch_ios_framework_command_test.dart | 4 ++++ .../commands/release/release_ios_command_test.dart | 4 ++++ .../release/release_ios_framework_command_test.dart | 4 ++++ 11 files changed, 44 insertions(+), 16 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 d04fe61d..511b6e58 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 @@ -76,7 +76,7 @@ const preLinkerFlutterRevisions = { }; /// {@template patch_ios_command} -/// `shorebird patch ios-alpha` command. +/// `shorebird patch ios` command. /// {@endtemplate} class PatchIosCommand extends ShorebirdCommand with ShorebirdBuildMixin, ShorebirdArtifactMixin { @@ -128,7 +128,10 @@ If this option is not provided, the version number will be determined from the p } @override - String get name => 'ios-alpha'; + String get name => 'ios'; + + @override + List get aliases => ['ios-alpha']; @override String get description => diff --git a/packages/shorebird_cli/lib/src/commands/patch/patch_ios_framework_command.dart b/packages/shorebird_cli/lib/src/commands/patch/patch_ios_framework_command.dart index dee6dc16..412fa3a6 100644 --- a/packages/shorebird_cli/lib/src/commands/patch/patch_ios_framework_command.dart +++ b/packages/shorebird_cli/lib/src/commands/patch/patch_ios_framework_command.dart @@ -59,7 +59,10 @@ of the iOS app that is using this module.''', final IosArchiveDiffer _archiveDiffer; @override - String get name => 'ios-framework-alpha'; + String get name => 'ios-framework'; + + @override + List get aliases => ['ios-framework-alpha']; @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 e1fb6df6..191769f3 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 @@ -51,7 +51,7 @@ Test on designated devices that do not need to be registered with the Apple deve } /// {@template release_ios_command} -/// `shorebird release ios-alpha` +/// `shorebird release ios` /// Create new app releases for iOS. /// {@endtemplate} class ReleaseIosCommand extends ShorebirdCommand @@ -96,6 +96,12 @@ class ReleaseIosCommand extends ShorebirdCommand ); } + @override + String get name => 'ios'; + + @override + List get aliases => ['ios-alpha']; + @override String get description => ''' Builds and submits your iOS app to Shorebird. @@ -103,9 +109,6 @@ Shorebird saves the compiled Dart code from your application in order to make smaller updates to your app. '''; - @override - String get name => 'ios-alpha'; - @override Future run() async { try { diff --git a/packages/shorebird_cli/lib/src/commands/release/release_ios_framework_command.dart b/packages/shorebird_cli/lib/src/commands/release/release_ios_framework_command.dart index 83176fe5..4fd69d25 100644 --- a/packages/shorebird_cli/lib/src/commands/release/release_ios_framework_command.dart +++ b/packages/shorebird_cli/lib/src/commands/release/release_ios_framework_command.dart @@ -33,11 +33,14 @@ of the iOS app that is using this module.''', } @override - String get description => - 'Builds and submits your iOS framework to Shorebird.'; + String get name => 'ios-framework'; @override - String get name => 'ios-framework-alpha'; + List get aliases => ['ios-framework-alpha']; + + @override + String get description => + 'Builds and submits your iOS framework to Shorebird.'; @override Future run() async { diff --git a/packages/shorebird_cli/lib/src/shorebird_artifact_mixin.dart b/packages/shorebird_cli/lib/src/shorebird_artifact_mixin.dart index ac0237c6..360f2044 100644 --- a/packages/shorebird_cli/lib/src/shorebird_artifact_mixin.dart +++ b/packages/shorebird_cli/lib/src/shorebird_artifact_mixin.dart @@ -151,15 +151,15 @@ mixin ShorebirdArtifactMixin on ShorebirdCommand { static const String appXcframeworkName = 'App.xcframework'; /// Returns the path to the App.xcframework generated by - /// `shorebird release ios-framework-alpha` or - /// `shorebird patch ios-framework-alpha`. + /// `shorebird release ios-framework` or + /// `shorebird patch ios-framework`. String getAppXcframeworkPath() { return p.join(getAppXcframeworkDirectory().path, appXcframeworkName); } /// Returns the [Directory] containing the App.xcframework generated by - /// `shorebird release ios-framework-alpha` or - /// `shorebird patch ios-framework-alpha`. + /// `shorebird release ios-framework` or + /// `shorebird patch ios-framework`. Directory getAppXcframeworkDirectory() { final projectRoot = shorebirdEnv.getShorebirdProjectRoot()!; return Directory( diff --git a/packages/shorebird_cli/test/fixtures/xcarchives/README.md b/packages/shorebird_cli/test/fixtures/xcarchives/README.md index 358d14d1..676f49f9 100644 --- a/packages/shorebird_cli/test/fixtures/xcarchives/README.md +++ b/packages/shorebird_cli/test/fixtures/xcarchives/README.md @@ -1,4 +1,4 @@ -The xcarchives in this folder were generated by building the stock Flutter counter app with `shorebird release ios-alpha --no-codesign`. .dylib files have been removed to reduce size. +The xcarchives in this folder were generated by building the stock Flutter counter app with `shorebird release ios --no-codesign`. .dylib files have been removed to reduce size. Files: diff --git a/packages/shorebird_cli/test/fixtures/xcframeworks/README.md b/packages/shorebird_cli/test/fixtures/xcframeworks/README.md index 5d836d06..f7488135 100644 --- a/packages/shorebird_cli/test/fixtures/xcframeworks/README.md +++ b/packages/shorebird_cli/test/fixtures/xcframeworks/README.md @@ -1,4 +1,4 @@ -The xcframework files in this folder were generated by building the stock Flutter counter app with `shorebird release ios-framework-alpha` and zipped with the `ditto` command. +The xcframework files in this folder were generated by building the stock Flutter counter app with `shorebird release ios-framework` and zipped with the `ditto` command. Files: 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 bb7316a1..bb5408fc 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 @@ -483,6 +483,10 @@ flutter: )..testArgResults = argResults; }); + test('supports alpha alias', () { + expect(command.aliases, contains('ios-alpha')); + }); + test('has a description', () { expect(command.description, isNotEmpty); }); diff --git a/packages/shorebird_cli/test/src/commands/patch/patch_ios_framework_command_test.dart b/packages/shorebird_cli/test/src/commands/patch/patch_ios_framework_command_test.dart index 88467061..18dec62c 100644 --- a/packages/shorebird_cli/test/src/commands/patch/patch_ios_framework_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/patch/patch_ios_framework_command_test.dart @@ -363,6 +363,10 @@ flutter: )..testArgResults = argResults; }); + test('supports alpha alias', () { + expect(command.aliases, contains('ios-framework-alpha')); + }); + test('has a description', () { expect(command.description, isNotEmpty); }); 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 d15d8b5d..c3521251 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 @@ -310,6 +310,10 @@ flutter: ..testArgResults = argResults; }); + test('supports alpha alias', () { + expect(command.aliases, contains('ios-alpha')); + }); + test('has a description', () { expect(command.description, isNotEmpty); }); diff --git a/packages/shorebird_cli/test/src/commands/release/release_ios_framework_command_test.dart b/packages/shorebird_cli/test/src/commands/release/release_ios_framework_command_test.dart index 47f212ac..b88205eb 100644 --- a/packages/shorebird_cli/test/src/commands/release/release_ios_framework_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/release/release_ios_framework_command_test.dart @@ -225,6 +225,10 @@ flutter: ..testArgResults = argResults; }); + test('supports alpha alias', () { + expect(command.aliases, contains('ios-framework-alpha')); + }); + test('has a description', () { expect(command.description, isNotEmpty); });