Skip to content

Commit

Permalink
Fix e2e RNTester build step
Browse files Browse the repository at this point in the history
Manually provide PROJECT_ROOT for RNTester project js bundle build step
  • Loading branch information
nossbigg committed May 19, 2019
1 parent 5d3d398 commit e608c4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RNTester/RNTester.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
68CD48B71D2BCB2C007E06A9 /* Run Script */,
68CD48B71D2BCB2C007E06A9 /* Bundle React Native code and images */,
EDEBC7DE214C68E400DD5AC8 /* Embed Frameworks */,
);
buildRules = (
Expand Down Expand Up @@ -1707,19 +1707,19 @@
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js";
};
68CD48B71D2BCB2C007E06A9 /* Run Script */ = {
68CD48B71D2BCB2C007E06A9 /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
name = "Bundle React Native code and images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js\n";
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js $SRCROOT/..\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
5 changes: 5 additions & 0 deletions scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# in node_modules.
PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../.."}

PROJECT_ROOT_OVERRIDE=$2
if [ "$PROJECT_ROOT_OVERRIDE" != "" ]; then
PROJECT_ROOT=$PROJECT_ROOT_OVERRIDE
fi

cd "$PROJECT_ROOT" || exit

# Define NVM_DIR and source the nvm.sh setup script
Expand Down

0 comments on commit e608c4c

Please sign in to comment.