1

I'm working on creating my first fastlane file and I want to use only the git commit messages from merges as the change log.

This way we can let our regular commits have a higher level of detail without making the change log so long and we can be less concerned with what we put in every commit message.

When we merge back in the develop branch we can enter good clean concise notes that make sense to the stake holders and the such there.

I know there is an action, changeling_from_git_commits.
While it would be easy enough to exclude merge commits there doesn't seem to be a way to use only merge commits.

Is there an alternative? Perhaps some tricks I can use in a bash script or something? I'm good with Objective-C and Swift but not terribly experienced with bash and Ruby (trying to remedy that these days).

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
theMikeSwan
  • 4,739
  • 2
  • 31
  • 44
  • I read the question few times and i really don't understand what you want to do. can you please explain it – CodeWizard Apr 13 '16 at 22:02
  • *If* master have **only mergesets**, you can try to use `between` additional option (detect correct ranges by hand) or (better, IMO) ask author for additional new option or changes in `include_merges` (now it's true|false, `only` can (?) be added) – Lazy Badger Apr 14 '16 at 05:13
  • Another way is to have (temporary) alias for plain `git log`: `git log --merges` (only mergesets in log at Gt-level) – Lazy Badger Apr 14 '16 at 05:15

1 Answers1

0

Since your goal here is to use only the merge commit message. Then Maybe you should consider making the changelog read from file in your fastfile like this.

# Variant 1: Read from file system
# note the `..`, since fastlane runs in the _fastlane_ directory
changelog = File.read("../Changelog.txt")

Then make your merge commit read commit message from same file while committing the merge commit.

git commit -F Changelog.txt

You will need to type your commit message (changelog) only once in that file before performing the merge commit.

Sources:
- https://docs.fastlane.tools/getting-started/android/beta-deployment/
- Preparing a git commit messaging before committing?

Amr Saleh
  • 313
  • 5
  • 9