mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-08 06:50:58 +02:00
Allow multiple sources
This commit is contained in:
@@ -76,7 +76,7 @@ if [ -f /data/"$BASENAME"/"$f"/updater.json ]; then
|
||||
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; }
|
||||
|
||||
if [ "$SOURCE" = "dockerhub" ]; then
|
||||
if [[ "$SOURCE" = dockerhub ]]; then
|
||||
# Use dockerhub as upstream
|
||||
# shellcheck disable=SC2116
|
||||
DOCKERHUB_REPO=$(echo "${UPSTREAM%%/*}")
|
||||
@@ -98,10 +98,11 @@ if [ -f /data/"$BASENAME"/"$f"/updater.json ]; then
|
||||
sort -V |
|
||||
tail -n 1
|
||||
)
|
||||
|
||||
else
|
||||
# Use github as upstream
|
||||
ARGUMENTS=""
|
||||
|
||||
# Use source as upstream
|
||||
ARGUMENTS="--at $SOURCE"
|
||||
|
||||
#Prepare tag flag
|
||||
if [ "${FULLTAG}" = true ]; then
|
||||
LOGINFO="... $SLUG : fulltag is on" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
@@ -130,14 +131,14 @@ if [ -f /data/"$BASENAME"/"$f"/updater.json ]; then
|
||||
if [ "${BETA}" = true ]; then
|
||||
LOGINFO="... $SLUG : beta is on" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
# shellcheck disable=SC2086
|
||||
LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" $ARGUMENTS) || continue
|
||||
LASTVERSION=$(lastversion --pre "$UPSTREAM" $ARGUMENTS) || continue
|
||||
else
|
||||
LOGINFO="... $SLUG : beta is off" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
# shellcheck disable=SC2086
|
||||
LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $ARGUMENTS) || continue
|
||||
LASTVERSION=$(lastversion "$UPSTREAM" $ARGUMENTS) || continue
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Add brackets
|
||||
LASTVERSION='"'${LASTVERSION}'"'
|
||||
|
||||
Reference in New Issue
Block a user