Skip to content

Commit 4562cb5

Browse files
author
Evan Lezar
committed
Merge branch 'update-release' into 'master'
Add scripting to update component submodules See merge request nvidia/container-toolkit/container-toolkit!97
2 parents 53c130f + 72e17e8 commit 4562cb5

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

scripts/release.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ else
5151
targets=${all[@]}
5252
fi
5353

54+
echo "Updating components"
55+
${SCRIPTS_DIR}/update-components.sh
56+
if [[ -n $(git status -s third_party) && ${ALLOW_LOCAL_COMPONENT_CHANGES} != "true" ]]; then
57+
echo "ERROR: Building with local component changes."
58+
echo "Commit pending changes or rerun with ALLOW_LOCAL_COMPONENT_CHANGES='true'"
59+
exit 1
60+
fi
61+
5462
eval $(${SCRIPTS_DIR}/get-component-versions.sh)
5563

5664
if [[ "${NVIDIA_CONTAINER_TOOLKIT_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}" != "${LIBNVIDIA_CONTAINER_VERSION}" ]]; then

scripts/update-components.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e -x
18+
19+
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )"
20+
PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )"
21+
22+
git submodule update --init
23+
24+
echo "Component status before update"
25+
git submodule status
26+
27+
# We update all submodules from their respective remotes
28+
# NOTE: Appending `-- [PATH]` will limit the update to a specific component
29+
git submodule update --remote
30+
31+
if [[ -z $(git status -s third_party) ]]; then
32+
echo "Components already up to date"
33+
else
34+
echo "Components updated"
35+
git submodule status
36+
fi

third_party/libnvidia-container

Submodule libnvidia-container updated from b6f85bb to d48f9b0

0 commit comments

Comments
 (0)