ios-templates
ios-templates copied to clipboard
Set the run number/build number of CI/CD tools as the app's build number
Issue
CI/CD tools like Bitrise, GitHubAction, and Codemagic provide the build number so we can use that for the build number of the application. The benefits of that are:
- It is easier to track the commit of a version.
- Avoid duplicate build numbers when rebuilding the same commit (after registering a new device, we must re-deploy the app).
- CI machines don't have to clone the whole project history to get the correct
number of commits
, reducing the overall build time and the cost of running CI/CD.
Solution
- Use
$BITRISE_BUILD_NUMBER
if CI/CD runs onBitrise
or$GITHUB_RUN_NUMBER
in the case ofGitHubAction
as the app's build number. - Update the private lane
bump_build
to take the build number variable from Bitrise or GitHubAction. - Update the property
release_tag
inVersioningManager
to take the build number instead of the@fastlane.number_of_commits
.
Who Benefits?
iOS Chapter and iOS developers
What next?
- [x] Create stories for updating
Bitrise
template,GitHubAction
template and FastLane template. - [ ] Implement and create pull requests. 🙌
A good thing we learned from Codemagic, right 🤟
@phongvhd93 you can create task for this RFC 🙏
This is a good story, we can reuse this as the story for the task.