Skip to content

Commit e608c4c

Browse files
committed
Fix e2e RNTester build step
Manually provide PROJECT_ROOT for RNTester project js bundle build step
1 parent 5d3d398 commit e608c4c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

RNTester/RNTester.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@
11071107
13B07F871A680F5B00A75B9A /* Sources */,
11081108
13B07F8C1A680F5B00A75B9A /* Frameworks */,
11091109
13B07F8E1A680F5B00A75B9A /* Resources */,
1110-
68CD48B71D2BCB2C007E06A9 /* Run Script */,
1110+
68CD48B71D2BCB2C007E06A9 /* Bundle React Native code and images */,
11111111
EDEBC7DE214C68E400DD5AC8 /* Embed Frameworks */,
11121112
);
11131113
buildRules = (
@@ -1707,19 +1707,19 @@
17071707
shellPath = /bin/sh;
17081708
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js";
17091709
};
1710-
68CD48B71D2BCB2C007E06A9 /* Run Script */ = {
1710+
68CD48B71D2BCB2C007E06A9 /* Bundle React Native code and images */ = {
17111711
isa = PBXShellScriptBuildPhase;
17121712
buildActionMask = 2147483647;
17131713
files = (
17141714
);
17151715
inputPaths = (
17161716
);
1717-
name = "Run Script";
1717+
name = "Bundle React Native code and images";
17181718
outputPaths = (
17191719
);
17201720
runOnlyForDeploymentPostprocessing = 0;
17211721
shellPath = /bin/sh;
1722-
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js\n";
1722+
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js $SRCROOT/..\n";
17231723
};
17241724
/* End PBXShellScriptBuildPhase section */
17251725

scripts/react-native-xcode.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5757
# in node_modules.
5858
PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../.."}
5959

60+
PROJECT_ROOT_OVERRIDE=$2
61+
if [ "$PROJECT_ROOT_OVERRIDE" != "" ]; then
62+
PROJECT_ROOT=$PROJECT_ROOT_OVERRIDE
63+
fi
64+
6065
cd "$PROJECT_ROOT" || exit
6166

6267
# Define NVM_DIR and source the nvm.sh setup script

0 commit comments

Comments
 (0)