Update 99-run.sh

This commit is contained in:
Alexandre
2024-01-11 16:05:25 +01:00
committed by GitHub
parent 263baba4b2
commit 9359f7f6be

View File

@@ -90,7 +90,8 @@ for f in */; do
#Find current version
LOGINFO="... $SLUG : get current version" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
CURRENT=$(jq .upstream_version updater.json) || { bashio::log.error "$SLUG addon upstream tag not found in updater.json. Exiting."; continue; }
CURRENT=$(jq .upstream_version updater.json) || \
{ bashio::log.error "$SLUG addon upstream tag not found in updater.json. Exiting."; continue; }
if [[ "$SOURCE" = dockerhub ]]; then
# Use dockerhub as upstream
@@ -200,8 +201,9 @@ for f in */; do
#Execute version search
# shellcheck disable=SC2086
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1)" || { if [[ "$SOURCE" == "github" ]] && [[ ${LASTVERSION,,} == *"no release found"* ]]; then
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1)" || \
# If failure, checks if there is packages that could be used
{ 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")" || true
@@ -231,7 +233,6 @@ for f in */; do
fi }
fi
# Add brackets
LASTVERSION='"'${LASTVERSION}'"'