Compare commits

..

No commits in common. "main" and "v20230416" have entirely different histories.

3 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,6 @@ RUN zypper --non-interactive install --no-recommends \
&& zypper clean -a \
rm /var/log/zypper.log
ENV TZ="Europe/Stockholm"
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@ -2,7 +2,7 @@
-include .env
VERSION=20230926
VERSION=20230416
IMAGENAME=dnsmasq
REPO=git.rre.nu/jonas
TITLE=dnsmasq based on openSUSE Tumpleweed

View File

@ -5,8 +5,6 @@ BASE_IMAGE="registry.opensuse.org/opensuse/tumbleweed"
TARGET_REPO="git.rre.nu/jonas/"
PACKAGE_NAME="dnsmasq"
git pull
echo "Pulling latest tumbleweed"
podman pull "${BASE_IMAGE}:latest"
@ -19,13 +17,16 @@ if [[ "$CURRENT_TUMBLEWEED_TAG" == "$LATEST_TUMBLEWEED_TAG" ]]; then
fi
echo "New tumbleweed image exists"
if [[ "x" == "x$(podman run --rm -it ${TARGET_REPO}${PACKAGE_NAME}:latest /usr/bin/bash -c "zypper list-updates | grep $PACKAGE_NAME")" ]]; then
echo "No updates for $PACKAGE_NAME"
exit 0
fi
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 "updates found : $LATEST_VERSION"
echo "current : $CURRENT_VERSION"
echo "latest : $LATEST_VERSION"
if [[ "$CURRENT_VERSION" == "$LATEST_VERSION" ]]; then
echo "No new $PACKAGE_NAME version detected"
exit 0
fi
#Updateing Makefile with latest image tag
sed -i 's/VERSION='"$CURRENT_TUMBLEWEED_TAG"'/VERSION='"$LATEST_TUMBLEWEED_TAG"'/' Makefile