Skip to content

Commit c0fe8f2

Browse files
committed
Skip components for patch releases
This change ensures that the nvidia-docker2 and nvidia-container-runtime components are not build and distributed for patch releases. Signed-off-by: Evan Lezar <[email protected]>
1 parent 926ac77 commit c0fe8f2

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

scripts/build-all-components.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ make -C "${NVIDIA_CONTAINER_TOOLKIT_ROOT}" \
6262
LIBNVIDIA_CONTAINER_TAG="${LIBNVIDIA_CONTAINER_TAG}" \
6363
"${TARGET}"
6464

65-
if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} ]]; then
65+
# If required we also build the nvidia-container-runtime and nvidia-docker packages.
66+
# Since these are essentially meta packages intended to allow for users to
67+
# transition from older installation workflows, we skip these for rc builds
68+
# (NVIDIA_CONTAINER_TOOLKIT_TAG != "") and releases with a non-zero patch
69+
# version of 0.
70+
if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} && "${NVIDIA_CONTAINER_TOOLKIT_VERSION%.0}" != "${NVIDIA_CONTAINER_TOOLKIT_VERSION}" ]]; then
6671
# We set the TOOLKIT_VERSION, TOOLKIT_TAG for the nvidia-container-runtime and nvidia-docker targets
6772
# The LIB_TAG is also overridden to match the TOOLKIT_TAG.
6873
# Build nvidia-container-runtime
@@ -82,5 +87,5 @@ if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} ]]; then
8287
${TARGET}
8388

8489
else
85-
echo "Skipping nvidia-container-runtime and nvidia-docker builds for release candidate"
90+
echo "Skipping nvidia-container-runtime and nvidia-docker builds."
8691
fi

scripts/extract-packages.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,21 @@ function skip-for-release-candidate() {
4545
return 0
4646
fi
4747

48-
# We allow all other packages for non-rc versions.
49-
if [[ "${VERSION/rc./}" == "${VERSION}" ]]; then
50-
return 1
48+
local is_non_patch_full_release=1
49+
# We allow all other packages for non-rc and non-patch release versions.
50+
if [[ "${VERSION/rc./}" != "${VERSION}" ]]; then
51+
is_non_patch_full_release=0
52+
fi
53+
if [[ "${VERSION%.0}" == "${VERSION}" ]]; then
54+
is_non_patch_full_release=0
5155
fi
5256

5357
local package_name=$1
5458
if [[ "${package_name/"nvidia-docker2"/}" != "${package_name}" ]]; then
55-
return 0
59+
return ${is_non_patch_full_release}
5660
fi
5761
if [[ "${package_name/"nvidia-container-runtime"/}" != "${package_name}" ]]; then
58-
return 0
62+
return ${is_non_patch_full_release}
5963
fi
6064
return 1
6165
}

0 commit comments

Comments
 (0)