Skip to content

Fix automated release notes (changelog) for fastlane.

Tomas Vik requested to merge fix-automated-changelog into master

This code change fixes the logic for creating changelog MR that is still triggered with every build.

This logic is currently creating the changelog for a new version, but it doesn't use that changelog when it's building artifacts.

The process

Important terms

  • VERSION_CODE - Different name for the GitLab CI pipeline ID. Used as an unique version for each build
  • fastlane/metadata/android/en-GB/changelogs/<'CURRENT_VERSION'|$VERSION_NUMBER>.txt - these are files with the changelog entries

There are a few critical steps that need to happen for creating a new changelog.

  1. Create ${VERSION_CODE}.txt file with content from CURRENT_VERISION.txt
  2. Create an MR with this code change
  3. Build an app

The issue

The current code has an issue because it does the following:

  1. Create ${VERSION_CODE}.txt file with content from CURRENT_VERISION.txt
  2. Commits this change into a new branch
  3. Create an MR with this code change
  4. git checkout <original commit> this removes the ${VERSION_CODE}.txt file which was supposed to be used by fastlane to populate release notes
  5. Build an app

The MR gets created, but the changelog is not used in the build

The fix

Tested

Tested in with the previous commit:

Edited by Tomas Vik

Merge request reports