diff --git a/addons_updater/CHANGELOG.md b/addons_updater/CHANGELOG.md index 74ed498dd..2d9f32a66 100644 --- a/addons_updater/CHANGELOG.md +++ b/addons_updater/CHANGELOG.md @@ -1,4 +1,5 @@ -## description: Automatic addons update by aligning version tag with upstream releases 3.19.15 (08-12-2025) +## description: Automatic addons update by aligning version tag with upstream releases 3.19.16 (2026-01-10) +- Add config option to choose ISO8601 (YYYY-MM-DD) or DD-MM-YYYY dates for last_update/changelog entries - The Home Assistant project has deprecated support for the armv7, armhf and i386 architectures. Support wil be fully dropped in the upcoming Home Assistant 2025.12 release - Improve Codeberg handling with a Gitea API fallback when lastversion lacks custom host support diff --git a/addons_updater/README.md b/addons_updater/README.md index 77b7fd84b..5841e7d77 100644 --- a/addons_updater/README.md +++ b/addons_updater/README.md @@ -81,6 +81,7 @@ repository: 'name/repo' coming from github gituser: your github username gitapi: your github api token(classic) https://github.com/settings/tokens gitmail: your github email +date_iso8601: true # use ISO8601 dates (YYYY-MM-DD) instead of DD-MM-YYYY verbose: 'false' ``` @@ -91,6 +92,7 @@ repository: alexbelgium/hassio-addons gituser: your github username gitapi: your github api token gitmail: your github email +date_iso8601: true verbose: "false" ``` diff --git a/addons_updater/config.yaml b/addons_updater/config.yaml index a7090fdf5..69475c4ed 100644 --- a/addons_updater/config.yaml +++ b/addons_updater/config.yaml @@ -11,11 +11,13 @@ map: - addon_config:rw name: Repository Updater options: + date_iso8601: true env_vars: [] gitapi: gitapi gituser: gituser repository: alexbelgium/hassio-addons schema: + date_iso8601: bool? env_vars: - name: match(^[A-Za-z0-9_]+$) value: str? @@ -28,4 +30,4 @@ schema: slug: updater udev: true url: https://github.com/alexbelgium/hassio-addons/tree/master/addons_updater -version: "3.19.15" +version: "3.19.16" diff --git a/addons_updater/rootfs/etc/cont-init.d/99-run.sh b/addons_updater/rootfs/etc/cont-init.d/99-run.sh index b6a3eb7a4..d09f05ddb 100755 --- a/addons_updater/rootfs/etc/cont-init.d/99-run.sh +++ b/addons_updater/rootfs/etc/cont-init.d/99-run.sh @@ -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