From 1916d68ee378c41bb60ebe0b67b2b69d6ba1166f Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 20 Nov 2019 16:05:21 +0100 Subject: util/release: Convert board IDs into human readable names Change-Id: Ie323112d27d228849cca7894b9ebd3f4dedd2d9a Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/c/coreboot/+/37022 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/release/genrelnotes | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/util/release/genrelnotes b/util/release/genrelnotes index d48a8e950d..e3af48c913 100755 --- a/util/release/genrelnotes +++ b/util/release/genrelnotes @@ -202,12 +202,22 @@ show_diff () { local new local old - new="$(comm -13 <(echo "$2") <(echo "$3") | sed 's/^/* /')" + new="$(comm -13 <(echo "$2") <(echo "$3"))" + old="$(comm -23 <(echo "$2") <(echo "$3"))" + + # Allow running a postprocessor, given as 4th argument over the + # resulting diff, provide context if it's old or new data + if [ -n "$4" ]; then + new=$(echo "$new" | $4 new | sort) + old=$(echo "$old" | $4 old | sort) + fi + new="$(printf "$new" | sed 's/^/* /')" + old="$(printf "$old" | sed 's/^/* /')" + if [ -n "$new" ]; then printf "Added %s $1:\n-------------------\n%s\n\n" \ "$(echo "$new" | wc -l)" "$new" >> "$LOGFILE" fi - old="$(comm -23 <(echo "$2") <(echo "$3") | sed 's/^/* /')" if [ -n "$old" ]; then printf "Removed %s $1:\n-------------------\n%s\n\n" \ "$(echo "$old" | wc -l)" "$old" >> "$LOGFILE" @@ -400,8 +410,26 @@ get_log_dedupe "Maintainers" "MAINTAINERS" "" # Finally, get anything that was missed above get_log_dedupe "MISC" "." +# Replace VENDOR_DEVICE from stdin with their nice names on stdout +real_mainboard_names() { + local tree_version=$1 # "old" or "new" + local git_version_var=${tree_version^^}_GIT_VERSION + local git_version=${!git_version_var} + local line + + while read line; do + local file="$(git grep -l "^[[:space:]]*config\>[[:space:]]*\[[:space:]]*\