Unverified Commit acdbe456 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Report error on iOS non-release archive builds (#12773)

Archive builds for upload to iTunes Connect should always be built in
release mode, not doing so results in crash on startup.

Bug: https://github.com/flutter/flutter/issues/12086
parent 9b5d663e
...@@ -36,6 +36,19 @@ BuildApp() { ...@@ -36,6 +36,19 @@ BuildApp() {
target_path="${FLUTTER_TARGET}" target_path="${FLUTTER_TARGET}"
fi fi
# Archive builds (ACTION=install) should always run in release mode.
if [[ "$ACTION" == "install" && "$FLUTTER_BUILD_MODE" != "release" ]]; then
EchoError "========================================================================"
EchoError "ERROR: Flutter archive builds must be run in Release mode."
EchoError ""
EchoError "To correct, run:"
EchoError "flutter build ios --release"
EchoError ""
EchoError "then re-run Archive from Xcode."
EchoError "========================================================================"
exit -1
fi
local build_mode="release" local build_mode="release"
if [[ -n "$FLUTTER_BUILD_MODE" ]]; then if [[ -n "$FLUTTER_BUILD_MODE" ]]; then
build_mode="${FLUTTER_BUILD_MODE}" build_mode="${FLUTTER_BUILD_MODE}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment