Skip to content
Permalink
Browse files

Fixed merge conflics

  • Loading branch information...
kylekirkby committed Oct 31, 2019
2 parents 06fcd48 + 9754d06 commit 3a00caa754a6a615d9a7a05e04f32550377b0f0c
Showing with 9 additions and 2 deletions.
  1. +9 −2 build-site.sh
@@ -33,8 +33,9 @@ get_tag_for_latest() {
ALL_TAGS=$(curl -s -H "Authorization: Bearer $TOKEN" https://index.docker.io/v2/$REPOSITORY/tags/list | jq -r .tags[]) || return $?
# Get image digest for target.
TARGET_DIGEST=$(curl -s -D - -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" "https://index.docker.io/v2/$REPOSITORY/manifests/$TARGET_TAG" | grep Docker-Content-Digest | cut -d ' ' -f 2) || return $?
# For each tag ...
for tag in "${ALL_TAGS[@]}"; do
# Iterate through the tags, but we need to use unquoted bash expansion so turn off the shellcheck warning
# shellcheck disable=SC2068
for tag in ${ALL_TAGS[@]}; do
# get image digest
digest=$(curl -s -D - -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" "https://index.docker.io/v2/$REPOSITORY/manifests/$tag" | grep Docker-Content-Digest | cut -d ' ' -f 2) || return $?
# and check digest.
@@ -57,6 +58,12 @@ check_container_version() {
echo "and try again."
echo "******************************************************************"
fi
if [ -z "$LATEST_ALIAS" ]; then
echo "******************************************************************"
echo "WARNING! It has not been possible to check that this is the latest"
echo " Docker image."
echo "******************************************************************"
fi
fi
}

0 comments on commit 3a00caa

Please sign in to comment.
You can’t perform that action at this time.