From 573fc586e8b75910f4e05c66d28999f2eb71ad8c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 31 Jan 2021 08:51:05 +0100 Subject: [PATCH] Fulltag added --- addons_updater/rootfs/etc/cont-init.d/run | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/addons_updater/rootfs/etc/cont-init.d/run b/addons_updater/rootfs/etc/cont-init.d/run index c2b91f7bb..81537226b 100644 --- a/addons_updater/rootfs/etc/cont-init.d/run +++ b/addons_updater/rootfs/etc/cont-init.d/run @@ -19,6 +19,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") + FULLTAG=$(bashio::config "addon[${addons}].fulltag") BASENAME=$(basename "https://github.com/$REPOSITORY") #Update local version @@ -33,14 +34,23 @@ for addons in $(bashio::config "addon|keys"); do #Find current version bashio::log.info "... $SLUG : get current version" CURRENT=$(jq .version config.json) || bashio::log.error "$SLUG addon version in config.json not found. Exiting." exit - + #Prepare tag flag + +if [ ${FULLTAG} = true ]; then +bashio::log.info "... $SLUG : fulltag is on" +FULLTAG="--format tag" +else +bashio::log.info "... $SLUG : fulltag is off" +FULLTAG="" +fi + #If beta flag, select beta version if [ ${BETA} = true ]; then bashio::log.info "... $SLUG : beta is on" - LASTVERSION='"'$(lastversion --pre "https://github.com/$UPSTREAM" --format tag)'"' + LASTVERSION='"'$(lastversion --pre "https://github.com/$UPSTREAM" $FULLTAG)'"' else bashio::log.info "... $SLUG : beta is off" - LASTVERSION='"'$(lastversion "https://github.com/$UPSTREAM" --format tag)'"' + LASTVERSION='"'$(lastversion "https://github.com/$UPSTREAM" $FULLTAG)'"' fi if [ ${CURRENT} != ${LASTVERSION} ]; then