This commit is contained in:
Alexandre
2021-02-21 10:21:08 +01:00
parent 68df6b0588
commit 5071617cb8
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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