Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
95877db01d | ||
|
7ae0fe1f15 | ||
|
98eb331fef | ||
|
bc772c85f7 | ||
|
4fc64c7c7d |
@ -9,6 +9,7 @@ RUN zypper --non-interactive install --no-recommends \
|
|||||||
&& zypper clean -a \
|
&& zypper clean -a \
|
||||||
rm /var/log/zypper.log
|
rm /var/log/zypper.log
|
||||||
|
|
||||||
|
ENV TZ="Europe/Stockholm"
|
||||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
-include .env
|
-include .env
|
||||||
|
|
||||||
VERSION=20230416
|
VERSION=20230926
|
||||||
IMAGENAME=dnsmasq
|
IMAGENAME=dnsmasq
|
||||||
REPO=git.rre.nu/jonas
|
REPO=git.rre.nu/jonas
|
||||||
TITLE=dnsmasq based on openSUSE Tumpleweed
|
TITLE=dnsmasq based on openSUSE Tumpleweed
|
||||||
|
15
autobuild.sh
15
autobuild.sh
@ -5,6 +5,8 @@ BASE_IMAGE="registry.opensuse.org/opensuse/tumbleweed"
|
|||||||
TARGET_REPO="git.rre.nu/jonas/"
|
TARGET_REPO="git.rre.nu/jonas/"
|
||||||
PACKAGE_NAME="dnsmasq"
|
PACKAGE_NAME="dnsmasq"
|
||||||
|
|
||||||
|
git pull
|
||||||
|
|
||||||
echo "Pulling latest tumbleweed"
|
echo "Pulling latest tumbleweed"
|
||||||
podman pull "${BASE_IMAGE}:latest"
|
podman pull "${BASE_IMAGE}:latest"
|
||||||
|
|
||||||
@ -17,16 +19,13 @@ if [[ "$CURRENT_TUMBLEWEED_TAG" == "$LATEST_TUMBLEWEED_TAG" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "New tumbleweed image exists"
|
echo "New tumbleweed image exists"
|
||||||
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'")"
|
if [[ "x" == "x$(podman run --rm -it ${TARGET_REPO}${PACKAGE_NAME}:latest /usr/bin/bash -c "zypper list-updates | grep $PACKAGE_NAME")" ]]; then
|
||||||
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 "No updates for $PACKAGE_NAME"
|
||||||
|
|
||||||
echo "current : $CURRENT_VERSION"
|
|
||||||
echo "latest : $LATEST_VERSION"
|
|
||||||
|
|
||||||
if [[ "$CURRENT_VERSION" == "$LATEST_VERSION" ]]; then
|
|
||||||
echo "No new $PACKAGE_NAME version detected"
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
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"
|
||||||
|
|
||||||
#Updateing Makefile with latest image tag
|
#Updateing Makefile with latest image tag
|
||||||
sed -i 's/VERSION='"$CURRENT_TUMBLEWEED_TAG"'/VERSION='"$LATEST_TUMBLEWEED_TAG"'/' Makefile
|
sed -i 's/VERSION='"$CURRENT_TUMBLEWEED_TAG"'/VERSION='"$LATEST_TUMBLEWEED_TAG"'/' Makefile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user