From 5071617cb88a619d14f421abc7e1aef0e5cf66ac Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 21 Feb 2021 10:21:08 +0100 Subject: [PATCH] update --- addons_updater/Dockerfile | 2 +- addons_updater/run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons_updater/Dockerfile b/addons_updater/Dockerfile index 4176c2a60..31d3522b6 100644 --- a/addons_updater/Dockerfile +++ b/addons_updater/Dockerfile @@ -5,7 +5,7 @@ VOLUME [ "/data" ] #Install last version https://github.com/dvershinin/lastversion RUN \ - apk add --no-cache git \ + apk add --no-cache git moreutils \ && pip install --upgrade pip \ && pip install lastversion diff --git a/addons_updater/run.sh b/addons_updater/run.sh index e14b82a86..f4a9295ea 100644 --- a/addons_updater/run.sh +++ b/addons_updater/run.sh @@ -77,8 +77,8 @@ for addons in $(bashio::config "addon|keys"); do #Change all instances of version LOGINFO="... $SLUG : updating files" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi - files=$(grep -rl ${CURRENT} /data/${BASENAME}/${SLUG}) && echo $files | xargs sed -i "s/${CURRENT}/${LASTVERSION}/g" # change all tags in all addon files - jq ".version = ${LASTVERSION//\"}" /data/${BASENAME}/${SLUG}/config.json >/dev/null # Correct config upstream + files=$(grep -rl ${CURRENT} /data/${BASENAME}/${SLUG}) && echo $files | xargs sed -i "s/${CURRENT}/${LASTVERSION}/g" # Change all tags in all addon files + jq --arg variable "${LASTVERSION}" '.version = ${variable}' /data/${BASENAME}/${SLUG}/options.json | sponge /data/${BASENAME}/${SLUG}/options.json # Replace version tag #Update changelog touch /data/${BASENAME}/${SLUG}/CHANGELOG.md