Skip to content

Instantly share code, notes, and snippets.

@colinta
Forked from zeemyself/react-native+0.64.2.patch
Last active September 8, 2021 20:36
Show Gist options
  • Save colinta/a03d9f994fecf64b5e2f3688e53febc7 to your computer and use it in GitHub Desktop.
Save colinta/a03d9f994fecf64b5e2f3688e53febc7 to your computer and use it in GitHub Desktop.
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index db9a34a..e95b882 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -165,7 +165,7 @@ def use_react_native_codegen!(spec, options={})
return if ENV['DISABLE_CODEGEN'] == '1'
# The path to react-native (e.g. react_native_path)
- prefix = options[:path] ||= File.join(__dir__, "..")
+ prefix = options[:path] ||= "../../node_modules/react-native"
# The path to JavaScript files
srcs_dir = options[:srcs_dir] ||= File.join(prefix, "Libraries")
@@ -208,12 +208,12 @@ def use_react_native_codegen!(spec, options={})
:name => 'Generate Specs',
:input_files => [srcs_dir],
:output_files => ["$(DERIVED_FILE_DIR)/codegen-#{codegen_modules_library_name}.log"].concat(generated_files),
- :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} #{File.join(__dir__, "generate-specs.sh")}' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
+ :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} ../../node_modules/react-native/scripts/generate-specs.sh' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
:execution_position => :before_compile,
:show_env_vars_in_log => true
}
- spec.prepare_command = "#{mkdir_command} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
+ spec.prepare_command = "cd ../.. && #{mkdir_command} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
end
# Local method for the Xcode 12.5 fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment