thoughtbot / react-native-template

Template React Native project to be used with Cookiecutter
MIT License
61 stars 8 forks source link

Automatically set build number/version code #30

Closed gfontenot closed 5 years ago

gfontenot commented 7 years ago

This updates the build processes for both Android and iOS so that the build number (iOS) and version code (Android) are automatically set at build time based on the number of commits on master. This keeps the numbers incrementing consistently without any explicit action needing to be taken by the developer.

gilesvangruisen commented 7 years ago

Clever!

gfontenot commented 7 years ago

Leaving this open, because there might be questions about if we should do this over explicitly bumping the build number/version code as a part of the release process

jakecraige commented 7 years ago

My only concern with this would be that it could be a bit noisy to keep committing new build numbers with each commit. Looks like that won't affect the gradle one since it's totally dynamic, does the way the iOS Script work change the file that stores the build number or just in memory?

gfontenot commented 7 years ago

This PR doesn't create commits for build numbers, it dynamically sets them via the build.gradle and by modifying the product's info.plist at build time.

gfontenot commented 7 years ago

I'm actually having second thoughts on this and have set up my current project to use explicit build number/version code bumps via fastlane. I'm going to leave this open for now as a reference in case people want to do this, but will wait to see how this feels on my current project before merging.

purinkle commented 5 years ago

Automatically set build number/version code