first tweaks for a release-notes addition

This commit is contained in:
mag37 2024-10-04 14:39:51 +02:00
parent 827bb7e14a
commit 9f8c62ed96
3 changed files with 16 additions and 1 deletions

View file

@ -148,6 +148,17 @@ progress_bar() {
[[ "$QueTotal" == "$QueCurrent" ]] && printf "\r[%b%s%b] %s/%s \n" "$c_teal" "$BarComplete" "$c_reset" "$QueCurrent" "$QueTotal"
}
### Function to add user-provided urls to releasenotes
releasenotes() {
for update in ${Updates[@]}; do
found=false
while read -r container url; do
[[ $update == $container ]] && printf "%s -> %s\n" "$update" "$url" && found=true
done < "$ScriptWorkDir"/urls.list
[[ $found == false ]] && printf "%s -> no url in list\n" "$update"
done
}
### Version check & initiate self update
if [[ "$VERSION" != "$LatestRelease" ]] ; then
printf "New version available! %b%s%b ⇒ %b%s%b \n Change Notes: %s \n" "$c_yellow" "$VERSION" "$c_reset" "$c_green" "$LatestRelease" "$c_reset" "$LatestChanges"

View file

@ -5,7 +5,7 @@
send_notification() {
Updates=("$@")
UpdToString=$( printf "%s\n" "${Updates[@]}" )
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
FromHost=$(hostname)
# platform specific notification code would go here

View file

@ -1,3 +1,7 @@
# This is a list of container names and releasenote urls, separated by space.
# Modify, add and (if necessary) remove to fit your needs.
# Additions are welcome! Append your list to the git-repo, use generic names and sensible urls.
apprise-api https://github.com/linuxserver/docker-apprise-api/releases
homer https://github.com/bastienwirtz/homer/releases
nginx https://github.com/docker-library/official-images/blob/master/library/nginx