From faef5714bfc3a378c17e57e74a438f9a38f3a5d7 Mon Sep 17 00:00:00 2001 From: Eyob Tefera Date: Fri, 21 Aug 2020 18:11:47 +0000 Subject: [PATCH 1/2] Feed generated changelog as input to goreleaser. --- releasing/cloudbuild.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/releasing/cloudbuild.sh b/releasing/cloudbuild.sh index 5b7da209f..e7aec2e7f 100755 --- a/releasing/cloudbuild.sh +++ b/releasing/cloudbuild.sh @@ -34,6 +34,12 @@ 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) + +# Generate the changelog for this release using commit hashes and commit messages. +cl=$(git log $lastCommitHash.. --pretty=oneline --abbrev-commit --no-decorate --no-color -- $module) + # Take everything after the last slash. # This should be something like "v1.2.3". semVer=`echo $fullTag | sed "s|$module/||"` @@ -111,4 +117,4 @@ EOF cat $configFile -/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $remainingArgs +/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $remainingArgs --release-notes <"$cl" From 40dc90b3b1a30653ec4ecf18b22b80149db47a85 Mon Sep 17 00:00:00 2001 From: Jeff Regan Date: Sat, 22 Aug 2020 17:45:16 -0700 Subject: [PATCH 2/2] Update cloudbuild.sh --- releasing/cloudbuild.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/releasing/cloudbuild.sh b/releasing/cloudbuild.sh index e7aec2e7f..b6e02d2c0 100755 --- a/releasing/cloudbuild.sh +++ b/releasing/cloudbuild.sh @@ -35,10 +35,14 @@ 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) +lastCommitHash=$( + git log --tags=$module -1 --oneline --no-walk --pretty=format:%h) -# Generate the changelog for this release using commit hashes and commit messages. -cl=$(git log $lastCommitHash.. --pretty=oneline --abbrev-commit --no-decorate --no-color -- $module) +# Generate the changelog for this release +# using commit hashes and commit messages. +cl=$( + git log $lastCommitHash.. --pretty=oneline \ + --abbrev-commit --no-decorate --no-color -- $module) # Take everything after the last slash. # This should be something like "v1.2.3".