3

I have a React Native app with code push configured and running. We use a variation of semantic versioning.

  • Incremental version is incremented automatically, and we use code push for most of these updates.
  • Minor version is incremented (mostly) automatically when there are native code changes (necessitating a new app store release).
  • Major version is manually specified, and mostly driven by business decisions/major functionality changes.

CodePush builds can target any app store release of the same minor version and lower incremental version (specified in CodePush configuration as >=2.20.0 <= 2.20.34, >=2.23.0 <=2.23.2, etc).

Our CI/CD pipeline detects native code changes by looking for changes in the project_root/android or project_root/ios directories, however, we've noticed this misses native code changes (especially since we updated to support autolinking). With iOS, the Podfile.lock usually updates, and correctly triggers our automatic minor version increment. With Android, updates to our native dependencies are frequently only visible (in git) as changes to the package.json, which isn't typically detected.

We could (additionally) trigger our minor version upgrade on every change to our package.json 'dependencies' section, but this would result in app store releases that could have just been code pushes (changes to js only libraries).

I'm looking for a better way to detect native code changes, particularly when the change is limited to an Android-only dependency.

CoatedMoose
  • 3,624
  • 1
  • 20
  • 36

1 Answers1

0

For now we are just checking for changes in /iOS and /android folders. It's not as graceful as I would hope but I'm still in search of something better.

Axel
  • 1
  • Like I said in the question, that's what we are (were) doing, but it has the problems with native dependencies (also outlined in the question). – CoatedMoose Jun 03 '23 at 18:09