This commit is contained in:
13
check.sh
13
check.sh
@@ -28,6 +28,10 @@ fi
|
||||
echo "${BASE}" | grep -q "/" || BASE="library/${BASE}"
|
||||
echo "${TARGET}" | grep -q "/" || TARGET="library/${TARGET}"
|
||||
|
||||
# if no tag is give default to latest
|
||||
echo "${BASE}" | grep -q ":" || BASE="${BASE}:latest"
|
||||
echo "${TARGET}" | grep -q ":" || TARGET="${TARGET}:latest"
|
||||
|
||||
|
||||
# move tha tag to its own var and remove it from the repo name
|
||||
BASE_TAG=$(echo "${BASE}" | sed 's/[^:]*://')
|
||||
@@ -36,15 +40,6 @@ TARGET_TAG=$(echo "${TARGET}" | sed 's/[^:]*://')
|
||||
BASE_REPO=$(echo "${BASE}" | sed 's/:.*//')
|
||||
TARGET_REPO=$(echo "${TARGET}" | sed 's/:.*//')
|
||||
|
||||
# if no tag is give default to latest
|
||||
if [ -z "${BASE_TAG}" ]; then
|
||||
BASE_TAG="latest"
|
||||
fi
|
||||
|
||||
if [ -z "${TARGET_TAG}" ]; then
|
||||
TARGET_TAG="latest"
|
||||
fi
|
||||
|
||||
|
||||
# build the url to the repo
|
||||
BASE_URL="https://hub.docker.com/v2/repositories/${BASE_REPO}/tags/${BASE_TAG}"
|
||||
|
||||
Reference in New Issue
Block a user