react-native/scripts
Janic Duplessis 9ccde378b6 Allow changing the project path in react-native-xcode.sh (#23273)
Summary:
When using react-native inside a monorepo with yarn workspaces the react-native installation can get hoisted and the assumption that the project is located in the folder where node_modules is is no longer true.

To handle this case I added an option to pass the path of the project root.

For example when using yarn workspace we can use something like this in the xcode scripts:

Assumes the following folder structure
/packages/myapp
/node_modules/react-native

```sh
export NODE_BINARY=node
export PROJECT_ROOT=$PWD/..
../../../node_modules/react-native/scripts/react-native-xcode.sh
```

It could be possible to change the default to `$PWD/..` since pwd is where the xcode project is located but then it would break if the native project structure is not the one we assume. To avoid the breaking change I decided to just keep the existing behaviour and allow changing the path with `PROJECT_ROOT`.

[ios] [added] - Allow changing the project path in react-native-xcode.sh
Pull Request resolved: https://github.com/facebook/react-native/pull/23273

Differential Revision: D13941793

Pulled By: cpojer

fbshipit-source-id: f394641b1c9d01f32bc4169097e39fc14df8191f
2019-02-04 08:01:24 -08:00
..
circleci Fix CircleCI build error (#22822) 2018-12-30 10:47:10 -08:00
versiontemplates Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
.packager.env Move YGStyle to seperate file and add constructors 2018-02-20 05:55:36 -08:00
.tests.env Bump to Android Build Tools 28.0.3, Gradle 4.10.2, Gradle Plugin 3.2.1 2019-01-11 12:24:59 -08:00
android-e2e-test.js Fix no shadow warnings (#22190) 2019-01-01 17:13:15 -08:00
android-setup.sh bump Android NDK to r17c (#21628) 2018-10-11 22:08:37 -07:00
bump-oss-version.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
ios-configure-glog.sh Upgrade folly to v2018.10.22.00 for iOS (#21976) 2018-10-29 12:13:11 -07:00
ios-install-third-party.sh Change location of iOS build cache directory to ~/Library/Caches/ (#22688) 2019-01-25 03:26:32 -08:00
launchPackager.bat Remove remaining references to local-cli 2018-12-10 19:08:10 -08:00
launchPackager.command Update RNTester snapshots 2018-12-18 16:20:10 -08:00
objc-test-ios.sh Propagate exit code in test_objc (#22562) 2018-12-10 20:34:12 -08:00
objc-test-tvos.sh Propagate exit code in test_objc (#22562) 2018-12-10 20:34:12 -08:00
objc-test.sh test_ios → : Update iOS Snapshots, remove tvOS tests, disable failing tests (#22720) 2018-12-20 15:08:47 -08:00
packager.sh Update RNTester snapshots 2018-12-18 16:20:10 -08:00
process-podspecs.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
publish-npm.js Deploy to npm on tagged commits only (#21250) 2018-09-22 09:16:58 -07:00
react-native-xcode.sh Allow changing the project path in react-native-xcode.sh (#23273) 2019-02-04 08:01:24 -08:00
run-android-ci-instrumentation-tests.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
run-android-emulator.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
run-android-local-integration-tests.sh Remove remaining references to local-cli 2018-12-10 19:08:10 -08:00
run-android-local-unit-tests.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
run-ci-e2e-tests.js Move react-native template 2018-12-07 07:49:19 -08:00
run-instrumentation-tests-via-adb-shell.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
sync-css-layout.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
test-manual-e2e.sh RN: Missing Copyright Headers 2018-10-31 01:37:26 -07:00
try-n-times.js Fix linting issues (#22062) 2018-11-01 14:29:16 -07:00
validate-android-device-env.sh Use ShellCheck (#19681) 2018-09-28 17:03:24 -07:00
validate-android-sdk.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
validate-android-test-env.sh fix validate-android-test-env.sh (#22961) 2019-01-14 10:54:18 -08:00
validate-ios-test-env.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00