From b7832d509b8113a6df7852ad7aa28ac5ad1d9a51 Mon Sep 17 00:00:00 2001 From: valerii-link <134977212+valerii-link@users.noreply.github.com> Date: Tue, 7 May 2024 09:48:17 +0200 Subject: [PATCH] fix(iOS): #591 track env file changes on each build --- react-native-config.podspec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/react-native-config.podspec b/react-native-config.podspec index c6f8492f..124abe86 100644 --- a/react-native-config.podspec +++ b/react-native-config.podspec @@ -20,12 +20,12 @@ Pod::Spec.new do |s| s.script_phase = { name: 'Config codegen', script: %( -set -ex -HOST_PATH="$SRCROOT/../.." -"${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig/BuildDotenvConfig.rb" "$HOST_PATH" "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig" -), + set -ex + HOST_PATH="$SRCROOT/../.." + "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig/BuildDotenvConfig.rb" "$HOST_PATH" "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig" + ), execution_position: :before_compile, - input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb'], + input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb', '$SRCROOT/../../.env', '$ENVFILE'], output_files: ['$BUILD_DIR/GeneratedInfoPlistDotEnv.h', '$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/GeneratedDotEnv.m'] } @@ -48,7 +48,7 @@ HOST_PATH="$SRCROOT/../.." "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig/BuildDotenvConfig.rb" "$HOST_PATH" "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig" ), execution_position: :before_compile, - input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb'], + input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb', '$SRCROOT/../../.env', '$ENVFILE'], output_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/GeneratedDotEnv.m'] } ext.source_files = ['ios/**/RNCConfig.{h,m}', 'ios/**/GeneratedDotEnv.m']