Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the run number/build number of CI/CD tools as the app's build number #305

Open
1 of 2 tasks
phongvhd93 opened this issue Jul 13, 2022 · 3 comments
Open
1 of 2 tasks
Assignees

Comments

@phongvhd93
Copy link
Contributor

phongvhd93 commented Jul 13, 2022

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 on Bitrise or $GITHUB_RUN_NUMBER in the case of GitHubAction 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 in VersioningManager to take the build number instead of the @fastlane.number_of_commits.

Who Benefits?

iOS Chapter and iOS developers

What next?

  • Create stories for updating Bitrise template, GitHubAction template and FastLane template.
  • Implement and create pull requests. 🙌
@phongvhd93 phongvhd93 self-assigned this Jul 13, 2022
@markgravity
Copy link
Contributor

A good thing we learned from Codemagic, right 🤟

@markgravity
Copy link
Contributor

@phongvhd93 you can create task for this RFC 🙏

@blyscuit blyscuit changed the title [RFC] Set the run number/build number of CI/CD tools as the app's build number Set the run number/build number of CI/CD tools as the app's build number Oct 9, 2023
@blyscuit
Copy link
Collaborator

blyscuit commented Oct 9, 2023

This is a good story, we can reuse this as the story for the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants