mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 21:11:08 +02:00
.github: detect kernel version correctly
`kernel-apply-patch.sh` cannot detect the existing kernel version, if the version does not have a patchlevel, e.g. `5.6`. So the old kernel version variable becomes an empty string, and the final pull request has an empty field after the `from` string. If the Manifest does not have a `patch-` line, try to read a `linux-` line again, to detect the correct kernel version.
This commit is contained in:
parent
0d4a0194be
commit
f6d9de2f68
@ -9,6 +9,9 @@ checkout_branches "linux-${VERSION_NEW}"
|
||||
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
||||
|
||||
VERSION_OLD=$(sed -n "s/^DIST patch-\(${KERNEL_VERSION}.[0-9]*\).*/\1/p" sys-kernel/coreos-sources/Manifest)
|
||||
if [[ -z "${VERSION_OLD}" ]]; then
|
||||
VERSION_OLD=$(sed -n "s/^DIST linux-\(${KERNEL_VERSION}*\).*/\1/p" sys-kernel/coreos-sources/Manifest)
|
||||
fi
|
||||
[[ "${VERSION_NEW}" = "${VERSION_OLD}" ]] && echo "already the latest Kernel, nothing to do" && exit
|
||||
|
||||
for pkg in sources modules kernel; do \
|
||||
|
Loading…
x
Reference in New Issue
Block a user