From 2bd8d77b2057b2906e2fb6d18edf5df936f0eecd Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Tue, 18 Apr 2023 10:26:28 +0200 Subject: [PATCH] check installed verson of dnsmasq in target image --- autobuild.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index fc58227..dc512ce 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -aeou pipefail -PACKAGE_NAME="dnsmasq" BASE_IMAGE="registry.opensuse.org/opensuse/tumbleweed" +TARGET_REPO="git.rre.nu/jonas/" +PACKAGE_NAME="dnsmasq" echo "Pulling latest tumbleweed" podman pull "${BASE_IMAGE}:latest" @@ -16,7 +17,7 @@ if [[ "$CURRENT_TUMBLEWEED_TAG" == "$LATEST_TUMBLEWEED_TAG" ]]; then fi echo "New tumbleweed image exists" -CURRENT_VERSION="$(podman run --rm -it ${BASE_IMAGE}:${CURRENT_TUMBLEWEED_TAG} /usr/bin/bash -c "zypper ref > /dev/null && zypper info $PACKAGE_NAME | sed -n 's/.*Version : \(.*\)$/\1/p'")" +CURRENT_VERSION="$(podman run --rm -it ${TARGET_REPO}${PACKAGE_NAME}:latest /usr/bin/bash -c "zypper info $PACKAGE_NAME | sed -n 's/.*Version : \(.*\)$/\1/p'")" LATEST_VERSION="$(podman run --rm -it ${BASE_IMAGE}:latest /usr/bin/bash -c "zypper ref > /dev/null && zypper info $PACKAGE_NAME | sed -n 's/.*Version : \(.*\)$/\1/p'")" echo "current : $CURRENT_VERSION"