mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
OSS: Fix $ENTRY_FILE check for non-Debug Xcode builds
Summary: The original $ENTRY_FILE check was added in https://github.com/facebook/react-native/pull/29012 to help catch misconfiguration for the entry JS file. That turned out breaking some RNTester builds/tests, so https://github.com/facebook/react-native/pull/29263 was added to accommodate the fact that RNTester .xcodeproj file has its own directory hierarchy. The 2nd PR had multiple issues: * It is incorrect to assume that the $ENTRY_FILE always exists in the parent dir of the .xcodeproj location. This caused an issue in RC 0.66: https://github.com/react-native-community/releases/issues/249#issue-983474535 * RNTester has since moved to packages/rn-tester/ (from RNTester/), hence breaking that assumption It turns out RNTester .xcodeproj has incorrectly misconfigured this JS bundling step (not sure since when). The original script invocation passed in the correct path for `RNTesterApp.ios.js`, but as an arg to the `react-native-xcode.sh` instead of by setting `ENTRY_FILE` env var. So this diff does 2 things: * Undid https://github.com/facebook/react-native/pull/29263 * Fix RNTester JS bundling invocation to set the ENTRY_FILE correctly {F659123377} Changelog: [iOS][Fixed] Unbreak $ENTRY_FILE handling for JS bundling Reviewed By: lunaleaps Differential Revision: D30690900 fbshipit-source-id: 7c5802b3eac56c0456edcd4b7478bfa4af48fc27
This commit is contained in:
@@ -321,7 +321,6 @@
|
||||
C38CB0C2095A8FFDE13321E5 /* Pods-RNTesterUnitTests.debug.xcconfig */,
|
||||
8735BC063632C9712E25C7D9 /* Pods-RNTesterUnitTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -610,7 +609,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=\"$SRCROOT/../../\"\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
|
||||
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=\"$SRCROOT/../../\"\nexport ENTRY_FILE=\"$SRCROOT/js/RNTesterApp.ios.js\"\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\"\n";
|
||||
};
|
||||
A2FBDDDD0C26B4EFA3726B6C /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
||||
@@ -74,7 +74,7 @@ else
|
||||
ENTRY_FILE=${1:-index.js}
|
||||
fi
|
||||
|
||||
if [[ $DEV != true && ! -f "../$ENTRY_FILE" ]]; then
|
||||
if [[ $DEV != true && ! -f "$ENTRY_FILE" ]]; then
|
||||
echo "error: Entry file $ENTRY_FILE does not exist. If you use another file as your entry point, pass ENTRY_FILE=myindex.js" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user