From 41c1c2312a672894a4079a64f1d516ad86abc330 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 20 Jan 2022 14:42:37 +0100 Subject: [PATCH] Add check for matching toolkit and lib versions to release script Signed-off-by: Evan Lezar --- scripts/release.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/release.sh b/scripts/release.sh index 5b0e74ee..34ae8570 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -53,6 +53,16 @@ else fi eval $(${SCRIPTS_DIR}/get-component-versions.sh) + +if [[ "${NVIDIA_CONTAINER_TOOLKIT_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}" != "${LIBNVIDIA_CONTAINER_VERSION}" ]]; then + set +x + echo "The libnvidia-container and nvidia-container-toolkit versions do not match." + echo "lib: '${LIBNVIDIA_CONTAINER_VERSION}'" + echo "toolkit: '${NVIDIA_CONTAINER_TOOLKIT_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}'" + set -x + [[ ${ALLOW_VERSION_MISMATCH} == "true" ]] || exit 1 +fi + export NVIDIA_CONTAINER_TOOLKIT_VERSION export NVIDIA_CONTAINER_TOOLKIT_TAG export NVIDIA_CONTAINER_RUNTIME_VERSION