diff --git a/base/generate-ci-config b/base/generate-ci-config index e516fbe3..1013f363 100755 --- a/base/generate-ci-config +++ b/base/generate-ci-config @@ -23,7 +23,8 @@ SUPPORTED_KERNELS=$(apt-cache search linux-objects-nvidia-${DRIVER_BRANCH}-serve DRIVER_VERSION=$(apt-cache show nvidia-utils-${DRIVER_BRANCH}-server |grep Version |awk '{print $2}' | cut -d'-' -f1 | head -n 1) # Latest supported kernel -SK=$(echo $SUPPORTED_KERNELS | awk '{print $NF}') +# only consider suffix -nvidia +SK=$(echo "$SUPPORTED_KERNELS" | awk '/-nvidia$/{last=$0} END{print last}') # Write to file echo "export KERNEL_VERSION=$SK DRIVER_VERSION=$DRIVER_VERSION DRIVER_VERSIONS=$DRIVER_VERSION" > /var/kernel_version.txt