What's the proper way to use patch-package for iOS circleci builds

302 Views Asked by At

During a react-native upgrade from version 0.63 to 0.65.2 I ran into an issue where react-native/scripts/find-node.sh was failing on my CircleCI builds. Turns out this is nvm/node related as discussed in the link above. I was able to verify this by ssh'ing on to a circle build, updating the node_modules/react-native/scripts/find-node.sh with the suggested fix of adding unset PREFIX to the top of the file and running the build again. It was successful. A related SO thread about this issue suggested using patch-package to apply this fix.

However, our circle builds use fastlane and fails on the ensure_git_status_clean step because of the suggested method in patch-package's circleci section. This method is basically creating a new file that causes the git status to be unclean.

So my question is, what is the best way to handle this without creating a new patches.hash file or how can it be created in a way that keeps the git status clean during the fastlane step of the cirleci build?

0

There are 0 best solutions below