From a5a16412cbf4f516d1869b6a902f8596528c5815 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Thu, 12 Dec 2024 17:56:26 +0100 Subject: [PATCH] test: edit_dockerfile --- pi/edit_dockerfile.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pi/edit_dockerfile.sh b/pi/edit_dockerfile.sh index 301d481..c8b30ee 100644 --- a/pi/edit_dockerfile.sh +++ b/pi/edit_dockerfile.sh @@ -19,21 +19,15 @@ do esac done -echo "------------ git status ------------" -git status -echo "------------------------------------" -echo "------------ ls -l ------------" -ls -l -echo "------------------------------------" echo "------------ echo grep ------------" -echo "grep ${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:v.*-${PARENT_IMAGE_TYPE} $DOCKERFILE" +echo "grep ${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME} $DOCKERFILE" echo "------------------------------------" echo "------------ grep ------------" -grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:v.*-${PARENT_IMAGE_TYPE}" $DOCKERFILE +grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}" $DOCKERFILE echo "------------------------------------" -grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:v.*-${PARENT_IMAGE_TYPE}" $DOCKERFILE | while read -r line ; do +grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}" $DOCKERFILE | while read -r line ; do PI_EXISTING_TAG=$(echo $line | sed 's|FROM ||g' | cut -d ':' -f 2) PI_EXISTING_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${PI_EXISTING_TAG}" PI_NEW_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${RELEASE_TAG}-${PARENT_IMAGE_TYPE}"