I have been using code-push in production for more than 2 years.
How I implemented?
In the latest RN version >=0.60, we have auto-linking of native modules. Because of this, I am not able to identify if any library newly added requires a native APK to be generated or just a bundle update.
Please provide suggestion how can this be done?
Environment
react-native-code-push version: 6.0.0
react-native version: 0.61.4
For all those people who have similar needs. Here's what I did.
cd ios && pod install
this step will update the Podfile.lock
file.android/
or ios/
folder was updated with files.Here's help on how to do conditional pipelines on Circle CI. https://medium.com/labs42/monorepo-with-circleci-conditional-workflows-69e65d3f1bd0
FILES_CHANGED=`git diff --name-only $1 $2 | grep "android/\|ios/"`
PARAMETERS='"trigger": false,'
if [[ $FILES_CHANGED == '' ]]; then
PARAMETERS+='"js": true'
echo "JS Code changes detected..."
else
PARAMETERS+='"native": true'
echo "Native Code changes detected..."
fi
Above snippet of shell code helps check the files changed.