From eeab4e5186961f9af591d0264d96f0e39d154886 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 1 Nov 2020 00:26:03 +0100 Subject: feat(updater): add changelog display by parsing the commit list --- tools/upgrade.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/upgrade.sh') diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 634d5c03d..5d593b6c6 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -64,6 +64,13 @@ if git pull --rebase --stat origin master; then ret=80 # non-zero exit code to indicate no changes pulled else message="Hooray! Oh My Zsh has been updated!" + + # Display changelog with less if available, otherwise just print it to the terminal + if (( $+commands[less] )); then + command less -R <("$ZSH/tools/changelog.sh" HEAD "$last_commit") + else + "$ZSH/tools/changelog.sh" HEAD "$last_commit" + fi fi printf '%s %s__ %s %s %s %s %s__ %s\n' $RAINBOW $RESET -- cgit v1.2.3-70-g09d2