Update run.sh

This commit is contained in:
Alexandre
2021-08-07 13:19:27 +02:00
committed by GitHub
parent 239e4e0402
commit a7045b90f8

View File

@@ -69,6 +69,7 @@ for addons in $(bashio::config "addon|keys"); do
REPOSITORY=$(bashio::config "addon[${addons}].repository")
UPSTREAM=$(bashio::config "addon[${addons}].upstream")
BETA=$(bashio::config "addon[${addons}].beta")
HAVINGASSET=$(bashio::config "addon[${addons}].having-asset")
FULLTAG=$(bashio::config "addon[${addons}].fulltag")
BASENAME=$(basename "https://github.com/$REPOSITORY")
DATE="$(date '+%d-%m-%Y')"
@@ -101,13 +102,20 @@ for addons in $(bashio::config "addon|keys"); do
FULLTAG=""
fi
#Prepare tag flag
if [ ${HAVEASSET} != null ]; then
HAVEASSET="--having-asset '"'$HAVEASSET'"'"
else
HAVEASSET=""
fi
#If beta flag, select beta version
if [ ${BETA} = true ]; then
LOGINFO="... $SLUG : beta is on" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi
LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" $FULLTAG)
LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" $Fulltag $HAVEASSET)
else
LOGINFO="... $SLUG : beta is off" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi
LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $FULLTAG)
LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $FULLTAG $HAVEASSET)
fi
# Add brackets