increment_version: improve automatic changelog

Change-Id: I532751e7650145f8c2aaef42b1a1dbe9468dd013
This commit is contained in:
SpiritCroc 2020-12-20 09:20:18 +01:00
parent 997fcf8fff
commit 11ef70d495
1 changed files with 10 additions and 1 deletions

View File

@ -103,7 +103,16 @@ set_prop "versionName" "\"$version\""
changelog_dir=fastlane/metadata/android/en-US/changelogs
changelog_file="$changelog_dir/$versionCode.txt"
mkdir -p "$changelog_dir"
git log --reverse --pretty=format:"- %s" "$last_tag".. --committer="$(git config user.name)" > "$changelog_file"
echo "Automatic changelog from commit history:" > "$changelog_file"
git log --reverse --pretty=format:"- %s" "$last_tag".. --committer="$(git config user.name)" \
| grep -v 'Automatic revert to unchanged upstream strings' \
| grep -v 'Automatic upstream merge preparation' \
| sed "s|Merge tag '\\(.*\\)' into sc|Update codebase to Element \1|" \
| grep -v "Automatic color correction" \
| grep -v "Automatic upstream merge postprocessing" \
| grep -v "Automatic SchildiChat string correction" \
| grep -v 'merge_helpers\|README\|increment_version' \
>> "$changelog_file"
if [ "$release_type" != "test" ]; then
$EDITOR "$changelog_file" || true
read -p "Press enter when changelog is done"