From 5b0cbcb5fbb486261c3c4796f42e99fec765931a Mon Sep 17 00:00:00 2001 From: Sam Wronski Date: Thu, 19 Nov 2020 14:28:05 -0800 Subject: [PATCH] Update release notes generation - Notes use tags instead commit sha --- releasing/cloudbuild.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/releasing/cloudbuild.sh b/releasing/cloudbuild.sh index 0f61a8cbf..ef91f511f 100755 --- a/releasing/cloudbuild.sh +++ b/releasing/cloudbuild.sh @@ -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