From fab50ed3b1532037fa67582a6b47ac4084daaa88 Mon Sep 17 00:00:00 2001 From: Titouan Christophe Date: Sun, 31 May 2026 14:05:22 +0200 Subject: [PATCH] utils/bump-stable-kernel-versions: automatically commit result Since this script is often used to bump kernel versions in multiple Buildroot branches, it makes sense to simply commit changes directly rather than letting the developer do it by hand. Signed-off-by: Titouan Christophe Signed-off-by: Arnout Vandecappelle --- utils/bump-stable-kernel-versions | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/bump-stable-kernel-versions b/utils/bump-stable-kernel-versions index 0e76cd1168..af85d32852 100755 --- a/utils/bump-stable-kernel-versions +++ b/utils/bump-stable-kernel-versions @@ -25,6 +25,7 @@ latest_version=$(sed -rn 's|^\tdefault "(.+)" if BR2_LINUX_KERNEL_LATEST_VERSION latest_release_version=$(echo "${latest_version}" | cut -f 1-2 -d .) echo "${latest_version} -> ${latest_release_version}" +updated_files_list=() updated_releases_list='' updated_versions='Update the latest kernel releases to:' @@ -98,6 +99,7 @@ update_linux_hash() { # We were iterating over this file so we could not edit in-place. mv "$HASHFILE.new" "$HASHFILE" + updated_files_list+=("$HASHFILE") } while IFS= read -r -d '' hashfile; do @@ -105,7 +107,12 @@ while IFS= read -r -d '' hashfile; do done < <(find linux/ -name '*.hash' -type f -print0) if [ -n "${updated_releases_list}" ]; then - echo ">>> Suggested subject: {linux, linux-headers}: bump${updated_releases_list//.x /.x, } series" + git add "${updated_files_list[@]}" linux/Config.in package/linux-headers/Config.in.host + git commit --verbose --edit --signoff --file=<( { + echo "{linux, linux-headers}: bump${updated_releases_list//.x /.x, } series" + echo + echo "${updated_versions}" + } ) else echo '>>> Nothing happened.' fi