Add ISO8601 date option for updater

This commit is contained in:
Alexandre
2026-01-10 09:36:36 +01:00
parent 67c55ae284
commit 4764881b9c
4 changed files with 14 additions and 3 deletions

View File

@@ -14,6 +14,11 @@ fi
bashio::log.info "Checking status of referenced repositories..."
VERBOSE=$(bashio::config 'verbose')
if bashio::config.true "date_iso8601"; then
DATE_FORMAT="+%Y-%m-%d"
else
DATE_FORMAT="+%d-%m-%Y"
fi
#Defining github value
LOGINFO="... github authentification" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
@@ -80,7 +85,7 @@ for f in */; do
EXCLUDE_TEXT=$(jq -r .github_exclude updater.json)
EXCLUDE_TEXT="${EXCLUDE_TEXT:-zzzzzzzzzzzzzzzz}"
PAUSED=$(jq -r .paused updater.json)
DATE="$(date '+%d-%m-%Y')"
DATE="$(date "$DATE_FORMAT")"
BYDATE=$(jq -r .dockerhub_by_date updater.json)
# Number of elements to check in dockerhub
@@ -163,6 +168,7 @@ for f in */; do
| jq '.results[] | select(.name==$LASTVERSION) | .last_updated' -r --arg LASTVERSION "$LASTVERSION"
) \
&& DATE="${DATE%T*}" \
&& DATE="$(date -d "$DATE" "$DATE_FORMAT")" \
&& LASTVERSION="$LASTVERSION-$DATE"
LOGINFO="... $SLUG : bydate is true, version is $LASTVERSION" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi