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