Hopefully make update messages shown after updates less spammy.

This commit is contained in:
Storm Dragon
2025-08-06 00:42:34 -04:00
parent 27f9e973a3
commit 775d48c068

View File

@@ -37,16 +37,25 @@ if [[ "$home" == "$remote" ]]; then
fi
agm_yesno "Audiogame Manager" "Audiogame Manager" "Updates are available. Would you like to update now?" || return
# Capture update output for display
local updateOutput
updateOutput=$({ git pull 2>&1
# Perform git pull quietly, then show only the important changes
local updateResult
git pull --quiet >/dev/null 2>&1
updateResult=$?
# Get the important information: commit messages and summary
local changesSummary
changesSummary=$({
echo "=== UPDATE COMPLETED ==="
echo
echo "Recent changes:"
git log '@{1}..' --pretty=format:'%an: %s' | tac; } 2>&1)
local updateResult=$?
git log '@{1}..' --pretty=format:'%an: %s' | tac
echo
echo "Update summary:"
git diff --stat '@{1}..' | tail -1
} 2>/dev/null)
# Show the update results
agm_msgbox "Update Complete" "Audiogame Manager" "$updateOutput"
# Show only the meaningful update information
agm_msgbox "Update Complete" "Audiogame Manager" "$changesSummary"
exit $updateResult
}