Automated Beta/Internal Change Notes with Fastlane
Do your TestFlight or Crashlytics have change notes that say something useless like Fixed bugs
? This is probably as useful as the equally ambiguous commit message fixed
.
Or maybe you painstakingly look through your PRs to find out what changes went in since your last release and scribble something out quickly so you can just get the build ready for your product or testing teams.
This process of writing up beta/internal change notes can be streamlined and save devs precious brain cells that can be used for more valuable decision making.
Step 1: Ensure you’re tagging your submission commits
I like to tag submission commits with tags shaped like:
submission/v4.2.0
Tagging with this strategy:
- Marks a time in history of exactly what the repo looked like when v4.2.0 was submitted to the App Store
- Groups all submissions together so they can be easily referenced in the future
Step 2: Fastlane - Get Change Notes
If you’re not already using fastlane, I highly recommend adding it to your project. If anything, at least use fastlane match to manage your certificates and provisioning profiles to save you and your team’s sanity.
Add this new lane to your Fastfile
:
desc "Get current change notes"
lane :get_change_notes do
# use subject/title of each git commit and bullet each line
changelog_from_git_commits(
pretty: '- %s',
tag_match_pattern: 'submission/*',
merge_commit_filtering: 'exclude_merges'
)
end
Step 3: Fastlane - Add Change Notes to Pilot/Crashlytics
Now you can take the output from get_change_notes
and use it in your call to pilot
or crashlytics
:
pilot(changelog: get_change_notes)
crashlytics(notes: get_change_notes)
I helped set this up as part of the Hipmunk iOS app’s release process. It was a preliminary step that was needed in order to have automated releases that could be deployed from CI, and it saved the team countless hours since it was implemented.
There just doesn’t need to be any need to think about what to go into these notes anymore, and teammates outside of the dev team have clear visibility into what’s going into builds.