Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] [Added] - Allow overriding ENTRY_FILE on react-native-xcode.sh script #23667

Closed
wants to merge 1 commit into from

Conversation

brunolemos
Copy link
Contributor

Summary

  1. Feature parity with Android, that already have this extensibility point on build.gradle:

    def entryFile = config.entryFile ?: "index.android.js"

  2. Helps with using react-native on a monorepo project (yarn workspaces) without having to use the no-hoist feature (e.g. in my case the ENTRY_FILE is on root/packages/mobile/index.js instead of root/index.ios.js)

Changelog

[iOS] [Added] - Allow overriding ENTRY_FILE on react-native-xcode.sh script

Test Plan

I've been using this patch on DevHub for a few months now (https://github.com/devhubapp/devhub/search?q=ENTRY_FILE&unscoped_q=ENTRY_FILE).

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 27, 2019
@react-native-bot react-native-bot added Platform: iOS iOS applications. PR: Includes Changelog Type: Enhancement A new feature or enhancement of an existing feature. labels Feb 27, 2019
@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 27, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @brunolemos in 22b3528.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added Merged This PR has been merged. and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 27, 2019
facebook-github-bot pushed a commit that referenced this pull request Oct 14, 2019
)

Summary:
- Using "System.getenv" allows to specify any entry file using environment variables and without modifying gradle file. Example:

    export ENTRY_FILE="another_entry_file.js"
    ./gradlew assembleDebug

- This functionality is also more align with iOS implementation that uses 'if [[ "$ENTRY_FILE" ]]; then'. See #23667 for more details.

- Possibility to define entry file on CI without modifying sources (Example: project like [pixels-catcher](https://www.npmjs.com/package/pixels-catcher) requires different entry file)

## Changelog:

[Android] [Added]  - Custom entry file on android using `ENTRY_FILE` environment variable
Pull Request resolved: #26769

Test Plan:
- Create a project from template

- Define `ENTRY_FILE` environment variable

```
export ENTRY_FILE="anotherIndexFile.js"
```

- Build android

```
./gradlew assembleDebug
```

Expected result: App contains bundle file that starts from `anotherIndexFile.js` file.

Differential Revision: D17903165

Pulled By: cpojer

fbshipit-source-id: 6b7cdf229918d101c170aa5fbdca6f3ef293d41c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants