From caeb76ed2dde506279925f0248dcc2e3d091fd53 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Tue, 11 Jul 2023 16:49:57 -0400 Subject: [PATCH] fix(shorebird_cli): add `--allow-downgrade` to `install-apks` (#833) --- packages/shorebird_cli/lib/src/bundletool.dart | 4 ++-- packages/shorebird_cli/test/src/bundletool_test.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/shorebird_cli/lib/src/bundletool.dart b/packages/shorebird_cli/lib/src/bundletool.dart index 6b78f1db..266c36a4 100644 --- a/packages/shorebird_cli/lib/src/bundletool.dart +++ b/packages/shorebird_cli/lib/src/bundletool.dart @@ -48,11 +48,11 @@ class Bundletool { /// Deploy your app from an APK set. /// - /// e.g. `bundletool install-apks --apks=/MyApp/my_app.apks` + /// e.g. `bundletool install-apks --apks=/MyApp/my_app.apks --allow-downgrade` /// /// https://developer.android.com/tools/bundletool#deploy_with_bundletool Future installApks({required String apks}) async { - final result = await _exec('install-apks --apks=$apks'); + final result = await _exec('install-apks --apks=$apks --allow-downgrade'); if (result.exitCode != 0) { throw Exception('Failed to install apks: ${result.stderr}'); } diff --git a/packages/shorebird_cli/test/src/bundletool_test.dart b/packages/shorebird_cli/test/src/bundletool_test.dart index e2faa549..3da904b4 100644 --- a/packages/shorebird_cli/test/src/bundletool_test.dart +++ b/packages/shorebird_cli/test/src/bundletool_test.dart @@ -173,7 +173,7 @@ void main() { verify( () => process.run( 'java', - '''-jar ${p.join(workingDirectory.path, 'bundletool.jar')} install-apks --apks=$apks''' + '''-jar ${p.join(workingDirectory.path, 'bundletool.jar')} install-apks --apks=$apks --allow-downgrade''' .split(' '), environment: { 'JAVA_HOME': javaHome,