From 18e5fd9078c03f1be0729876c3a22ca3c91da2e6 Mon Sep 17 00:00:00 2001 From: Ram Lavi Date: Mon, 16 Dec 2024 13:57:40 +0200 Subject: [PATCH] dbg Signed-off-by: Ram Lavi --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8b16fc06d..4eeeb426a 100644 --- a/Makefile +++ b/Makefile @@ -94,15 +94,16 @@ container: manager docker-push: $(OCI_BIN) push ${TLS_SETTING} ${REGISTRY}/${IMG}:${IMAGE_TAG} @if [[ "${REGISTRY}" == localhost* || "${REGISTRY}" == 127.0.0.1* ]]; then \ - echo "Local registry detected (${REGISTRY}). Skipping IMAGE_GIT_TAG handling."; \ + echo "DEBUG: Local registry detected (${REGISTRY}). Skipping IMAGE_GIT_TAG handling."; \ else \ if skopeo inspect docker://${REGISTRY}/${IMG}:${IMAGE_GIT_TAG} >/dev/null 2>&1; then \ - echo "Tag '${IMAGE_GIT_TAG}' already exists. Skipping tagging and push."; \ + echo "DEBUG: Tag '${IMAGE_GIT_TAG}' already exists. Skipping tagging and push."; \ elif skopeo inspect docker://${REGISTRY}/${IMG}:${IMAGE_GIT_TAG} 2>&1 | grep -q "manifest unknown"; then \ + echo "DEBUG: Tag '${IMAGE_GIT_TAG}' does not exist. Tagging and pushing..."; \ $(OCI_BIN) tag ${REGISTRY}/${IMG}:${IMAGE_TAG} ${REGISTRY}/${IMG}:${IMAGE_GIT_TAG}; \ $(OCI_BIN) push ${TLS_SETTING} ${REGISTRY}/${IMG}:${IMAGE_GIT_TAG}; \ else \ - echo "Error checking for tag '${IMAGE_GIT_TAG}'. Aborting to avoid potential overwrite."; \ + echo "DEBUG: Error occurred while checking for tag '${IMAGE_GIT_TAG}'. Aborting to avoid potential overwrite."; \ exit 1; \ fi; \ fi