diff --git a/addons_updater/rootfs/etc/cont-init.d/99-run.sh b/addons_updater/rootfs/etc/cont-init.d/99-run.sh index 74f56e5d8..14ab1cf36 100755 --- a/addons_updater/rootfs/etc/cont-init.d/99-run.sh +++ b/addons_updater/rootfs/etc/cont-init.d/99-run.sh @@ -206,12 +206,13 @@ for f in */; do fi if [[ "$SOURCE" == *"github"* ]] && [[ "$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1 || true)" == *"No release"* ]]; 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 + bashio::log.warning "No version found, looking if packages available" + last_packages="$(curl -s -L https://github.com/"$REPOSITORY"/packages | sed -n "s/.*\/container\/package\/\([^\"]*\).*/\1/p")" || true last_package="$(echo "$last_packages" | head -n 1)" || true 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" - LASTVERSION="$(curl -s https://github.com/"$REPOSITORY"/pkgs/container/"$last_package" | sed -n "s/.*?tag=\([^\"]*\)\">.*/\1/p" | + bashio::log.warning "A total of $(echo -n "$last_packages" | grep -c '^') packages were found, using $last_package" + LASTVERSION="" + LASTVERSION="$(curl -s -L https://github.com/"$REPOSITORY"/pkgs/container/"$last_package" | sed -n "s/.*?tag=\([^\"]*\)\">.*/\1/p" | sed -e '/.*latest.*/d' | sed -e '/.*dev.*/d' | sed -e '/.*nightly.*/d' | @@ -223,6 +224,8 @@ for f in */; do # Continue to next echo "No packages found" set_continue=true + else + echo "Found tag $LASTVERSION" fi else # Continue to next