mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Update 99-run.sh
This commit is contained in:
@@ -206,12 +206,13 @@ for f in */; do
|
|||||||
fi
|
fi
|
||||||
if [[ "$SOURCE" == *"github"* ]] && [[ "$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1 || true)" == *"No release"* ]]; then
|
if [[ "$SOURCE" == *"github"* ]] && [[ "$(lastversion "$UPSTREAM" $ARGUMENTS 2>&1 || true)" == *"No release"* ]]; then
|
||||||
# Is there a package
|
# Is there a package
|
||||||
echo "No version found, looking if packages available"
|
bashio::log.warning "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 -L https://github.com/"$REPOSITORY"/packages | sed -n "s/.*\/container\/package\/\([^\"]*\).*/\1/p")" || true
|
||||||
last_package="$(echo "$last_packages" | head -n 1)" || true
|
last_package="$(echo "$last_packages" | head -n 1)" || true
|
||||||
if [[ "$(echo -n "$last_packages" | grep -c '^')" -gt 0 ]]; then
|
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"
|
bashio::log.warning "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" |
|
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 '/.*latest.*/d' |
|
||||||
sed -e '/.*dev.*/d' |
|
sed -e '/.*dev.*/d' |
|
||||||
sed -e '/.*nightly.*/d' |
|
sed -e '/.*nightly.*/d' |
|
||||||
@@ -223,6 +224,8 @@ for f in */; do
|
|||||||
# Continue to next
|
# Continue to next
|
||||||
echo "No packages found"
|
echo "No packages found"
|
||||||
set_continue=true
|
set_continue=true
|
||||||
|
else
|
||||||
|
echo "Found tag $LASTVERSION"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Continue to next
|
# Continue to next
|
||||||
|
|||||||
Reference in New Issue
Block a user