From ccfeb87d0d7e28cc27b57a5bbecbe471ceb7aad3 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Thu, 18 Apr 2024 11:57:09 -0400 Subject: [PATCH] chore(shorebird_cli): improve patch output when release uses non-default flutter version (#1932) --- .../lib/src/commands/patch/patch_android_command.dart | 10 +++------- .../lib/src/commands/patch/patch_ios_command.dart | 8 +------- .../src/commands/patch/patch_android_command_test.dart | 8 +------- .../src/commands/patch/patch_ios_command_test.dart | 8 +------- 4 files changed, 6 insertions(+), 28 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 15f6d526..1408d809 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 @@ -184,13 +184,9 @@ Please re-run the release command for this version or create a new release.'''); final currentFlutterRevision = shorebirdEnv.flutterRevision; if (release.flutterRevision != currentFlutterRevision) { - logger.info(''' - -The release you are trying to patch was built with a different version of Flutter. - -Release Flutter Revision: ${release.flutterRevision} -Current Flutter Revision: $currentFlutterRevision -'''); + logger.info( + 'Release was built with Flutter revision ${release.flutterRevision}', + ); } try { 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 e92bdeb7..9fec24aa 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 @@ -202,13 +202,7 @@ Please re-run the release command for this version or create a new release.'''); final currentFlutterRevision = shorebirdEnv.flutterRevision; if (release.flutterRevision != currentFlutterRevision) { logger.info( - ''' - -The release you are trying to patch was built with a different version of Flutter. - -Release Flutter Revision: ${release.flutterRevision} -Current Flutter Revision: $currentFlutterRevision -''', + 'Release was built with Flutter revision ${release.flutterRevision}', ); } 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 ad5fa3c2..9b1aa5bb 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 @@ -515,13 +515,7 @@ Please re-run the release command for this version or create a new release.'''), expect(exitCode, ExitCode.success.code); verify( () => logger.info( - any( - that: stringContainsInOrder([ - '''The release you are trying to patch was built with a different version of Flutter.''', - 'Release Flutter Revision: ${release.flutterRevision}', - 'Current Flutter Revision: $otherRevision', - ]), - ), + 'Release was built with Flutter revision ${release.flutterRevision}', ), ).called(1); }); 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 dfb37abe..82529d87 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 @@ -858,13 +858,7 @@ Please re-run the release command for this version or create a new release.'''), ).thenAnswer((_) async {}); verify( () => logger.info( - any( - that: stringContainsInOrder([ - '''The release you are trying to patch was built with a different version of Flutter.''', - 'Release Flutter Revision: ${preLinkerRelease.flutterRevision}', - 'Current Flutter Revision: $otherRevision', - ]), - ), + '''Release was built with Flutter revision ${preLinkerRelease.flutterRevision}''', ), ).called(1); });