From 411c02d72979a849b1574bdcbae1c0d5c4659db8 Mon Sep 17 00:00:00 2001 From: internetisaiah <95643215+internetisaiah@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:30:53 -0800 Subject: [PATCH 1/2] Fix double-quote issue for 'release' command --- scripts/create_release_text.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/create_release_text.sh b/scripts/create_release_text.sh index 25a148f13ac..83a7fa7ff44 100755 --- a/scripts/create_release_text.sh +++ b/scripts/create_release_text.sh @@ -16,7 +16,14 @@ 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/},]/}]/' | jq -c '. | sort_by(.date)') + COMMIT_LOGS=$(git log --merges --first-parent --since="$LAST_RELEASE_TIMESTAMP" origin/master \ + --pretty=format:'{%n : <%H>,%n : <%cI>,%n : <%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." From 1ad0ad53711edaa9ab1fde092864cfcab1e13cdc Mon Sep 17 00:00:00 2001 From: isaiah robinson <95643215+internetisaiah@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:43:00 -0800 Subject: [PATCH 2/2] Update scripts/create_release_text.sh --- scripts/create_release_text.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/create_release_text.sh b/scripts/create_release_text.sh index 83a7fa7ff44..33eebece9b2 100755 --- a/scripts/create_release_text.sh +++ b/scripts/create_release_text.sh @@ -16,7 +16,6 @@ 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"}' \