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