From df5ae20a77a135fa6effbdf7f31129bf3ac9567e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=81=A5=E8=8E=B9?= Date: Sat, 14 Jan 2023 14:22:01 +0800 Subject: [PATCH] fix iOS builder adds export build argument check error --- examples/hello_world/distribute_options.yaml | 1 + packages/flutter_app_builder/CHANGELOG.md | 4 ++++ .../flutter_app_builder/lib/src/app_builder_ios.dart | 2 +- packages/flutter_app_builder/pubspec.yaml | 2 +- packages/flutter_distributor/CHANGELOG.md | 4 ++++ .../flutter_distributor/lib/src/flutter_distributor.dart | 9 +++++++-- packages/flutter_distributor/pubspec.lock | 2 +- packages/flutter_distributor/pubspec.yaml | 4 ++-- 8 files changed, 21 insertions(+), 7 deletions(-) diff --git a/examples/hello_world/distribute_options.yaml b/examples/hello_world/distribute_options.yaml index 727b6c78..7c10d340 100644 --- a/examples/hello_world/distribute_options.yaml +++ b/examples/hello_world/distribute_options.yaml @@ -32,6 +32,7 @@ releases: target: ipa build_args: export-options-plist: ios/ExportOptions.plist + # export-method: ad-hoc dart-define: APP_ENV: dev - name: linux-appimage diff --git a/packages/flutter_app_builder/CHANGELOG.md b/packages/flutter_app_builder/CHANGELOG.md index add75d9e..039c2515 100644 --- a/packages/flutter_app_builder/CHANGELOG.md +++ b/packages/flutter_app_builder/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.8 + +* fix iOS builder adds export build argument check error + ## 0.2.7 * iOS builder adds export build argument check diff --git a/packages/flutter_app_builder/lib/src/app_builder_ios.dart b/packages/flutter_app_builder/lib/src/app_builder_ios.dart index 46a81313..1dcff1c5 100644 --- a/packages/flutter_app_builder/lib/src/app_builder_ios.dart +++ b/packages/flutter_app_builder/lib/src/app_builder_ios.dart @@ -17,7 +17,7 @@ class AppBuilderIos extends AppBuilder { String? target, required Map buildArguments, }) { - if (!buildArguments.containsKey('export-options-plist') || + if (!buildArguments.containsKey('export-options-plist') && !buildArguments.containsKey('export-method')) { throw BuildError( 'Missing `export-options-plist` or `export-method` build argument.', diff --git a/packages/flutter_app_builder/pubspec.yaml b/packages/flutter_app_builder/pubspec.yaml index 2e246b94..0bba057a 100644 --- a/packages/flutter_app_builder/pubspec.yaml +++ b/packages/flutter_app_builder/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_app_builder description: Build your Flutter app via Dart. -version: 0.2.7 +version: 0.2.8 homepage: https://github.com/leanflutter/flutter_distributor environment: diff --git a/packages/flutter_distributor/CHANGELOG.md b/packages/flutter_distributor/CHANGELOG.md index 51df4f24..fc5af6cb 100644 --- a/packages/flutter_distributor/CHANGELOG.md +++ b/packages/flutter_distributor/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.8 + +* fix iOS builder adds export build argument check error + ## 0.2.7 * Feat: Linux RPM packaging support (#101) diff --git a/packages/flutter_distributor/lib/src/flutter_distributor.dart b/packages/flutter_distributor/lib/src/flutter_distributor.dart index ad52f9b5..4eb5a129 100644 --- a/packages/flutter_distributor/lib/src/flutter_distributor.dart +++ b/packages/flutter_distributor/lib/src/flutter_distributor.dart @@ -164,6 +164,8 @@ class FlutterDistributor { } on UnsupportedError catch (error) { logger.warning('Warning: ${error.message}'.yellow()); continue; + } catch (error) { + rethrow; } } @@ -187,9 +189,12 @@ class FlutterDistributor { makeResultList.add(makeResult); } } - } on Error catch (error) { + } catch (error) { logger.severe(error.toString().red()); - logger.severe(error.stackTrace.toString().red()); + if (error is Error) { + logger.severe(error.stackTrace.toString().red()); + } + rethrow; } return makeResultList; diff --git a/packages/flutter_distributor/pubspec.lock b/packages/flutter_distributor/pubspec.lock index c67f0aa8..d20b300e 100644 --- a/packages/flutter_distributor/pubspec.lock +++ b/packages/flutter_distributor/pubspec.lock @@ -84,7 +84,7 @@ packages: path: "../flutter_app_builder" relative: true source: path - version: "0.2.7" + version: "0.2.8" flutter_app_packager: dependency: "direct main" description: diff --git a/packages/flutter_distributor/pubspec.yaml b/packages/flutter_distributor/pubspec.yaml index 42e28630..fcb8ec66 100644 --- a/packages/flutter_distributor/pubspec.yaml +++ b/packages/flutter_distributor/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_distributor description: A complete tool for packaging and publishing your Flutter apps. -version: 0.2.7 +version: 0.2.8 homepage: https://github.com/leanflutter/flutter_distributor platforms: @@ -18,7 +18,7 @@ dependencies: app_package_publisher: ^0.2.5 args: ^2.2.0 dio: ^4.0.4 - flutter_app_builder: ^0.2.7 + flutter_app_builder: ^0.2.8 flutter_app_packager: ^0.2.7 flutter_app_publisher: ^0.2.5 logging: ^1.0.2