mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-02-22 03:20:32 +01:00
Update run
This commit is contained in:
@@ -37,10 +37,10 @@ for addons in $(bashio::config "addon|keys"); do
|
|||||||
#If beta flag, select beta version
|
#If beta flag, select beta version
|
||||||
if [ ${BETA} = true ]; then
|
if [ ${BETA} = true ]; then
|
||||||
bashio::log.info "... $SLUG : beta is on"
|
bashio::log.info "... $SLUG : beta is on"
|
||||||
LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" --format tag)
|
LASTVERSION='"'$(lastversion --pre "https://github.com/$UPSTREAM" --format tag)'"'
|
||||||
else
|
else
|
||||||
bashio::log.info "... $SLUG : beta is off"
|
bashio::log.info "... $SLUG : beta is off"
|
||||||
LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" --format tag)
|
LASTVERSION='"'$(lastversion "https://github.com/$UPSTREAM" --format tag)'"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${CURRENT} != ${LASTVERSION} ]; then
|
if [ ${CURRENT} != ${LASTVERSION} ]; then
|
||||||
@@ -50,7 +50,7 @@ for addons in $(bashio::config "addon|keys"); do
|
|||||||
#Change all instances of version
|
#Change all instances of version
|
||||||
bashio::log.info "... $SLUG : updating files"
|
bashio::log.info "... $SLUG : updating files"
|
||||||
|
|
||||||
files=$(grep -rl '"'${CURRENT}'"' /${BASENAME}/${SLUG}) && echo $files | xargs sed -i 's/"'${CURRENT}'"/"'${LASTVERSION}'"/g'
|
files=$(grep -rl ${CURRENT} /${BASENAME}/${SLUG}) && echo $files | xargs sed -i "s/${CURRENT}/${LASTVERSION}/g"
|
||||||
|
|
||||||
if [ $files != null ]; then
|
if [ $files != null ]; then
|
||||||
git commit -m "Bot update to $CURRENT" $files || true
|
git commit -m "Bot update to $CURRENT" $files || true
|
||||||
|
|||||||
Reference in New Issue
Block a user