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