diff --git a/docker/owlbot/python/cloudbuild.yaml b/docker/owlbot/python/cloudbuild.yaml index e7d19bedd..a80b165e2 100644 --- a/docker/owlbot/python/cloudbuild.yaml +++ b/docker/owlbot/python/cloudbuild.yaml @@ -4,7 +4,15 @@ steps: entrypoint: '/bin/sh' args: - '-c' - - 'git log -1 --format="%s%n%nSource-Link: https://github.com/googleapis/synthtool/commit/%H" | sed -e "s/([^()]*)$//g" > post-processor-changes.txt' + # Get the last commit in synthtool and write it to post-processor-changes.txt. + # If the commit message ends with parenthesis, remove them. + # If the commit message starts with feat or fix, replace it with chore. + # If the commit message includes ! followed by a colon to signal a breaking change, remove the !. + - > + git log -1 --format="%s%n%nSource-Link: https://github.com/googleapis/synthtool/commit/%H" > post-processor-changes.txt && + sed -i "s/([^()]*)$//g" post-processor-changes.txt && + sed -i "s/^\(feat\|fix\)/chore/g" post-processor-changes.txt && + sed -i "s/\!:/:/g" post-processor-changes.txt - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/owlbot-python:$SHORT_SHA',