Update release notes generation

- Notes use tags instead commit sha
This commit is contained in:
Sam Wronski
2020-11-19 14:28:05 -08:00
parent a6833bc4c0
commit 5b0cbcb5fb

View File

@@ -34,15 +34,13 @@ echo "Remaining args: $remainingArgs"
module=${fullTag%/*}
echo "module=$module"
# Obtain most recent commit hash associated with the module.
lastCommitHash=$(
git log --tags=$module -1 \
--oneline --no-walk --pretty=format:%h)
# Find previous tag that matches the tags module
prevTag=$(git tag -l "$module*" --sort=-version:refname --no-contains=$currentTag | head -n 1)
# Generate the changelog for this release
# using commit hashes and commit messages.
# using the last two tags for the module
changeLogFile=$(mktemp)
git log $lastCommitHash.. \
git log $prevTag..$fullTag \
--pretty=oneline \
--abbrev-commit --no-decorate --no-color --no-merges \
-- $module > $changeLogFile