fixed check updates availibillity
This commit is contained in:
parent
7ae0fe1f15
commit
95877db01d
13
autobuild.sh
13
autobuild.sh
@ -19,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…
Reference in New Issue
Block a user