diff options
author | Patrick Georgi <pgeorgi@google.com> | 2019-11-20 16:05:21 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-22 21:50:24 +0000 |
commit | 1916d68ee378c41bb60ebe0b67b2b69d6ba1166f (patch) | |
tree | d56bad33720bc8d38c99cfe13c2d2216e30547c4 /util/release/genrelnotes | |
parent | d653e491e133df1b9e066a3817396f739e2c5533 (diff) | |
download | coreboot-1916d68ee378c41bb60ebe0b67b2b69d6ba1166f.tar.xz |
util/release: Convert board IDs into human readable names
Change-Id: Ie323112d27d228849cca7894b9ebd3f4dedd2d9a
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37022
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/release/genrelnotes')
-rwxr-xr-x | util/release/genrelnotes | 34 |
1 files 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:]]*\<BOARD_${line}\$" ${git_version} -- src/mainboard/\*/\*/Kconfig.name | sed "s,^${git_version}:,,")" + if [ -z "$file" ]; then + echo "This shouldn't happen: couldn't find Kconfig for $line" + exit 1 + fi + local vendor="$(git grep \" ${git_version} -- $(echo ${file} | cut -d/ -f1-3,5) | cut -d\" -f2)" + git grep -h -A1 "^[[:space:]]*config\>[[:space:]]*\<BOARD_${line}\$" ${git_version} -- ${file} | grep \" |cut -d\" -f2 |sed "s,^,${vendor} ," + done +} + # Show areas that have been added or removed -show_diff "mainboards" "$mainboard_list_old" "$mainboard_list_new" +show_diff "mainboards" "$mainboard_list_old" "$mainboard_list_new" real_mainboard_names show_diff "processors" "$cpu_list_old" "$cpu_list_new" show_diff "socs" "$soc_list_old" "$soc_list_new" show_diff "northbridges" "$northbridge_list_old" "$northbridge_list_new" |