mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
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 <titouan.christophe@mind.be> Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
79431203c3
commit
fab50ed3b1
@@ -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 .)
|
latest_release_version=$(echo "${latest_version}" | cut -f 1-2 -d .)
|
||||||
echo "${latest_version} -> ${latest_release_version}"
|
echo "${latest_version} -> ${latest_release_version}"
|
||||||
|
|
||||||
|
updated_files_list=()
|
||||||
updated_releases_list=''
|
updated_releases_list=''
|
||||||
updated_versions='Update the latest kernel releases to:'
|
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.
|
# We were iterating over this file so we could not edit in-place.
|
||||||
mv "$HASHFILE.new" "$HASHFILE"
|
mv "$HASHFILE.new" "$HASHFILE"
|
||||||
|
updated_files_list+=("$HASHFILE")
|
||||||
}
|
}
|
||||||
|
|
||||||
while IFS= read -r -d '' hashfile; do
|
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)
|
done < <(find linux/ -name '*.hash' -type f -print0)
|
||||||
|
|
||||||
if [ -n "${updated_releases_list}" ]; then
|
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
|
else
|
||||||
echo '>>> Nothing happened.'
|
echo '>>> Nothing happened.'
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user