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 bd95970 commit ece87d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions RNTester/RNTester.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,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 @@ -1704,19 +1704,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 Expand Up @@ -1914,10 +1914,10 @@
BUNDLE_CONFIG = "$(SRCROOT)/../metro.config.js";
DEVELOPMENT_TEAM = VYK7DLU38Z;
GCC_PREPROCESSOR_DEFINITIONS = (
"RN_BUNDLE_PREFIX=$(RN_BUNDLE_PREFIX)",
"DEBUG=1",
"$(inherited)",
);
"RN_BUNDLE_PREFIX=$(RN_BUNDLE_PREFIX)",
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../third-party/boost_1_63_0",
"$(SRCROOT)/../third-party/folly-2018.10.22.00",
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

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

0 comments on commit ece87d2

Please sign in to comment.