From e8af566b3460ff3ac6bf2afd30554e7dc548d064 Mon Sep 17 00:00:00 2001 From: julian-CStack Date: Fri, 22 Sep 2023 10:59:27 -0600 Subject: [PATCH] Squashed 'cargokit/' changes from 7467b9a..7a5bba8 7a5bba8 fix: setup flutter environment for Xcode iOS builds (#30) git-subtree-dir: cargokit git-subtree-split: 7a5bba8eefbfe7e567f754477fd172e7a06b153f --- build_pod.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build_pod.sh b/build_pod.sh index b50d35bb..481071ee 100755 --- a/build_pod.sh +++ b/build_pod.sh @@ -37,11 +37,17 @@ export CARGOKIT_TOOL_TEMP_DIR=$TARGET_TEMP_DIR/build_tool # Directory inside root project. Not necessarily the top level directory of root project. export CARGOKIT_ROOT_PROJECT_DIR=$SRCROOT -FLUTTER_EXPORT_ENVIRONMENT="$PODS_ROOT/../Flutter/ephemeral/flutter_export_environment.sh" - -if [[ -f "$FLUTTER_EXPORT_ENVIRONMENT" ]]; then - source "$FLUTTER_EXPORT_ENVIRONMENT" -fi +FLUTTER_EXPORT_BUILD_ENVIRONMENT=( + "$PODS_ROOT/../Flutter/ephemeral/flutter_export_environment.sh" # macOS + "$PODS_ROOT/../Flutter/flutter_export_environment.sh" # iOS +) + +for path in "${FLUTTER_EXPORT_BUILD_ENVIRONMENT[@]}" +do + if [[ -f "$path" ]]; then + source "$path" + fi +done "$BASEDIR/run_build_tool.sh" build-pod "$@"