mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove hermesc build dir for non-Hermes build
Summary: Changelog: [iOS][Fixed] - Remove hermesc build dir for non-Hermes build. Reviewed By: christophpurrer Differential Revision: D41052884 fbshipit-source-id: c9e85ca06cef79fa35e81972181558d44ca93d90
This commit is contained in:
committed by
Riccardo Cipolleschi
parent
1739139c7c
commit
0d90a44adf
@@ -64,14 +64,13 @@ def remove_hermesc_build_dir(react_native_path)
|
||||
%x(rm -rf #{react_native_path}/sdks/hermes-engine/build_host_hermesc)
|
||||
end
|
||||
|
||||
def is_building_hermes_from_source(react_native_version)
|
||||
is_nightly = react_native_version.start_with?('0.0.0-')
|
||||
has_tarball = ENV['HERMES_ENGINE_TARBALL_PATH'] != nil
|
||||
def is_building_hermes_from_source(react_native_version, react_native_path)
|
||||
isInMain = react_native_version.include?('1000.0.0')
|
||||
|
||||
# this is the same logic in the hermes-engine.podspec
|
||||
if has_tarball || is_nightly
|
||||
return false
|
||||
end
|
||||
hermestag_file = File.join(react_native_path, "sdks", ".hermesversion")
|
||||
isInCI = ENV['CI'] === 'true'
|
||||
|
||||
return true
|
||||
isReleaseBranch = File.exists?(hermestag_file) && isInCI
|
||||
|
||||
return isInMain || isReleaseBranch
|
||||
end
|
||||
|
||||
@@ -209,6 +209,7 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
|
||||
add_copy_hermes_framework_script_phase(installer, react_native_path)
|
||||
else
|
||||
remove_copy_hermes_framework_script_phase(installer, react_native_path)
|
||||
remove_hermesc_build_dir(react_native_path)
|
||||
end
|
||||
|
||||
ReactNativePodsUtils.exclude_i386_architecture_while_using_hermes(installer)
|
||||
|
||||
Reference in New Issue
Block a user