Skip to content

Commit

Permalink
Merge pull request #2883 from monopole/tweakCloudBuild
Browse files Browse the repository at this point in the history
Tweak cloudbuild.sh release note handling
  • Loading branch information
monopole authored Aug 23, 2020
2 parents a77d7e5 + cc5617c commit a0b7288
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions releasing/cloudbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ echo "module=$module"

# Obtain most recent commit hash associated with the module.
lastCommitHash=$(
git log --tags=$module -1 --oneline --no-walk --pretty=format:%h)
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)
changeLog=$(mktemp)
git log $lastCommitHash.. \
--pretty=oneline \
--abbrev-commit --no-decorate --no-color \
-- $module > $changeLog

# Take everything after the last slash.
# This should be something like "v1.2.3".
Expand Down Expand Up @@ -121,4 +124,8 @@ EOF

cat $configFile

/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $remainingArgs --release-notes <"$cl"
/bin/goreleaser release \
--config=$configFile \
--rm-dist \
--skip-validate $remainingArgs \
--release-notes $changeLog

0 comments on commit a0b7288

Please sign in to comment.