mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-15 07:48:14 +01:00
first tweaks for a release-notes addition
This commit is contained in:
parent
827bb7e14a
commit
9f8c62ed96
3 changed files with 16 additions and 1 deletions
11
dockcheck.sh
11
dockcheck.sh
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue