mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-15 03:49:20 +02:00
ongoing
This commit is contained in:
@@ -200,9 +200,29 @@ for f in */; do
|
|||||||
|
|
||||||
#Execute version search
|
#Execute version search
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
LASTVERSION=$(lastversion "$UPSTREAM" $ARGUMENTS) || continue
|
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1)" || \
|
||||||
fi
|
\
|
||||||
|
# check if it is an issue with no releases in github
|
||||||
|
( if [[ "$SOURCE" == "github" ]] && [[ ${LASTVERSION,,} == *"no release found"* ]]; then
|
||||||
|
|
||||||
|
# Is there a package
|
||||||
|
echo "No version found, looking if packages available"
|
||||||
|
last_packages="$(curl -s https://github.com/$REPOSITORY/packages | sed -n "s/.*\/container\/package\/\([^\"]*\).*/\1/p")"
|
||||||
|
last_package="$(echo "$last_packages" | head -n 1)"
|
||||||
|
if [[ "$(echo -n "$last_packages" | grep -c '^')" -gt 0 ]]; then
|
||||||
|
echo "A total of $(echo -n "$last_packages" | grep -c '^') packages were found, using $last_package"
|
||||||
|
else
|
||||||
|
echo "No packages found"
|
||||||
|
# Continue to next
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Are there tags
|
||||||
|
|
||||||
|
else
|
||||||
|
# Continue to next
|
||||||
|
continue
|
||||||
|
fi )
|
||||||
|
|
||||||
# Add brackets
|
# Add brackets
|
||||||
LASTVERSION='"'${LASTVERSION}'"'
|
LASTVERSION='"'${LASTVERSION}'"'
|
||||||
|
|||||||
Reference in New Issue
Block a user