Fix post_install hook to use the project directory when patching a ReactNative file#14239
Merged
jkmassel merged 1 commit intorelease/15.0from Jun 3, 2020
Merged
Fix post_install hook to use the project directory when patching a ReactNative file#14239jkmassel merged 1 commit intorelease/15.0from
jkmassel merged 1 commit intorelease/15.0from
Conversation
|
You can trigger an installable build for these changes by visiting CircleCI here. |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
loremattei
approved these changes
Jun 3, 2020
Contributor
There was a problem hiding this comment.
This fixes the issue 👍👍
As discussed in Slack, running shell commands this way is dangerous because it fails silently, so we may get in troubles again in the future.
I think this fix is good for moving the release ahead, but we should work at a more reliable solution in develop, either forking the original repository until the patch lands or improving the post_install hook so that it breaks when the shell command fails.
cc/ @jkmassel
Contributor
Author
|
Thank you @loremattei Opened another issue to tackle that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
We saw that the patch introduced with this PR was not getting applied. It manifested itself in the ActionSheet, mover buttons aren't disabled properly.
Reality:
Expected:

Root Cause
It turns out fastlane builds are run from the WordPress/Scripts folder, so
patchdoesn't find the file since there's no dir asScripts/patches.(fastlane scripts that we use to build the releases live in the Scripts folder)
To fix this, we are updating the paths to use project_root.
To test:
Scriptfolder and runbundle exec pod install/Users/pinarolguc/Development/WordPress-iOS/Pods/React-RCTActionSheet/RCTActionSheetManager.mmake sure this line exists:NSArray<NSNumber *> *disabledButtonIndices = [RCTConvert NSArray:options[@"disabledButtonIndices"]];rake dependenciesin the root folder(WordPress-iOS)bonus: It'd be good if we can open the app and see the mover buttons getting disabled as well
PR submission checklist:
RELEASE-NOTES.txtif necessary.