diff --git a/cargokit/build_pod.sh b/cargokit/build_pod.sh index b50d35bb..481071ee 100755 --- a/cargokit/build_pod.sh +++ b/cargokit/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 "$@"