Skip to content

Commit 08e5ba2

Browse files
cipolleschiOthinn
authored andcommitted
Make hermes build fetching more flavour resilient (facebook#41055)
Summary: Pull Request resolved: facebook#41055 This should fix the issue highlighted in [this comment](reactwg/react-native-releases#64 (comment)). Basically, before the fix, we were not supporting flavours correctly, as we assumed that only Debug and Release were available. With this change, we infer whether we have to fetch Hermes for Debug or Release based on the actual flags that are passed. In this way, the users can customize their app's flavors more freely. ## Changelog: [Internal] - Support multiple flavors when downloading Hermes Reviewed By: huntie Differential Revision: D50408381 fbshipit-source-id: 6990218b286b4dd823323bc63de90279efc9e74e
1 parent d2b04e0 commit 08e5ba2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/react-native/sdks/hermes-engine/hermes-engine.podspec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ Pod::Spec.new do |spec|
6060
:execution_position => :before_compile,
6161
:script => <<-EOS
6262
. "$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
63-
"$NODE_BINARY" "$REACT_NATIVE_PATH/sdks/hermes-engine/utils/replace_hermes_version.js" -c "$CONFIGURATION" -r "#{version}" -p "$PODS_ROOT"
63+
64+
CONFIG="Release"
65+
if echo $GCC_PREPROCESSOR_DEFINITIONS | grep -q "DEBUG=1"; then
66+
CONFIG="Debug"
67+
fi
68+
69+
"$NODE_BINARY" "$REACT_NATIVE_PATH/sdks/hermes-engine/utils/replace_hermes_version.js" -c "$CONFIG" -r "#{version}" -p "$PODS_ROOT"
6470
EOS
6571
}
6672
end

0 commit comments

Comments
 (0)