Skip to content

Commit

Permalink
Merge pull request #8382 from braze-inc/bdocs-hotfix
Browse files Browse the repository at this point in the history
Fix double-quote issue for 'release' command
  • Loading branch information
josh-mccrowell-braze authored Nov 7, 2024
2 parents 3d42cf9 + 1ad0ad5 commit 92500c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/create_release_text.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ main() {
LAST_RELEASE_TIMESTAMP=$(git log -1 --pretty=format:"%cI" "$LAST_RELEASE_TAG")

# Convert Git logs to JSON and sort by date.
COMMIT_LOGS=$(git log --merges --first-parent --since="$LAST_RELEASE_TIMESTAMP" origin/master --pretty=format:'{%n "commit": "%H",%n "date": "%cI",%n "title": "%s",%n "body": "%b"%n},' | perl -pe 'BEGIN{print "["}; END{print "]\n"}' | perl -pe 's/},]/}]/' | jq -c '. | sort_by(.date)')
COMMIT_LOGS=$(git log --merges --first-parent --since="$LAST_RELEASE_TIMESTAMP" origin/master \
--pretty=format:'{%n <commit>: <%H>,%n <date>: <%cI>,%n <title>: <%s>,%n <body>: <%b>%n},' \
| perl -pe 'BEGIN{print "["}; END{print "]\n"}' \
| perl -pe 's/},]/}]/' \
| sed 's/"//g' \
| sed 's/</"/g; s/>/"/g' \
| jq '. | sort_by(.date)')

if [ -z "$COMMIT_LOGS" ]; then
echo "No commit logs found. Exiting."
Expand Down

0 comments on commit 92500c3

Please sign in to comment.