Skip to content

Commit d509320

Browse files
authored
Merge pull request #780 from tobiasge/fixed-comment
Fixed comment and variable name
2 parents f80cc70 + 401777a commit d509320

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
277277
###
278278
# Checking if the build is necessary,
279279
# meaning build only if one of those values changed:
280-
# - Python base image digest (Label: PYTHON_BASE_DIGEST)
281-
# - netbox git ref (Label: NETBOX_GIT_REF)
282-
# - netbox-docker git ref (Label: org.label-schema.vcs-ref)
280+
# - base image digest
281+
# - netbox git ref (Label: netbox.git-ref)
282+
# - netbox-docker git ref (Label: org.opencontainers.image.revision)
283283
###
284284
# Load information from registry (only for docker.io)
285285
SHOULD_BUILD="false"
@@ -295,12 +295,12 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
295295
# Need to use "library/..." for images the have no two part name
296296
DOCKER_FROM_SPLIT[0]="library/${DOCKER_FROM_SPLIT[0]}"
297297
fi
298-
PYTHON_LAST_LAYER=$(get_image_last_layer "${DOCKER_FROM_SPLIT[0]}" "${DOCKER_FROM_SPLIT[1]}")
298+
BASE_LAST_LAYER=$(get_image_last_layer "${DOCKER_FROM_SPLIT[0]}" "${DOCKER_FROM_SPLIT[1]}")
299299
mapfile -t IMAGES_LAYERS_OLD < <(get_image_layers "${DOCKER_ORG}"/"${DOCKER_REPO}" "${TAG}")
300300
NETBOX_GIT_REF_OLD=$(get_image_label netbox.git-ref "${DOCKER_ORG}"/"${DOCKER_REPO}" "${TAG}")
301301
GIT_REF_OLD=$(get_image_label org.opencontainers.image.revision "${DOCKER_ORG}"/"${DOCKER_REPO}" "${TAG}")
302302

303-
if ! printf '%s\n' "${IMAGES_LAYERS_OLD[@]}" | grep -q -P "^${PYTHON_LAST_LAYER}\$"; then
303+
if ! printf '%s\n' "${IMAGES_LAYERS_OLD[@]}" | grep -q -P "^${BASE_LAST_LAYER}\$"; then
304304
SHOULD_BUILD="true"
305305
BUILD_REASON="${BUILD_REASON} debian"
306306
fi

0 commit comments

Comments
 (0)