mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-30 04:14:04 +02:00
Update 99-run.sh
This commit is contained in:
@@ -201,7 +201,7 @@ for f in */; do
|
|||||||
|
|
||||||
# If failure, checks if there is packages that could be used
|
# If failure, checks if there is packages that could be used
|
||||||
function test_packages () {
|
function test_packages () {
|
||||||
if [[ "$SOURCE" == "github" ]] && [[ ${LASTVERSION,,:-} == *"no release found"* ]]; then
|
if [[ "$SOURCE" == "github" ]] && [[ "$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1 || true)" == *"No release found"* ]]; then
|
||||||
# Is there a package
|
# Is there a package
|
||||||
echo "No version found, looking if packages available"
|
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
|
last_packages="$(curl -s https://github.com/"$REPOSITORY"/packages | sed -n "s/.*\/container\/package\/\([^\"]*\).*/\1/p")" || true
|
||||||
@@ -229,11 +229,13 @@ for f in */; do
|
|||||||
else
|
else
|
||||||
# Continue to next
|
# Continue to next
|
||||||
continue
|
continue
|
||||||
fi }
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#Execute version search
|
#Execute version search
|
||||||
|
LASTVERSION=""
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1 || test_packages)"
|
LASTVERSION="$(lastversion "$UPSTREAM" $ARGUMENTS || test_packages)"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user