summaryrefslogtreecommitdiff
path: root/tools/upgrade.sh
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2020-11-01 00:26:03 +0100
committerMarc Cornellà <marc.cornella@live.com>2020-11-30 15:48:46 +0100
commiteeab4e5186961f9af591d0264d96f0e39d154886 (patch)
treecf0b8594b70529943685b8e01908fa1756c52263 /tools/upgrade.sh
parente093a4cf62d494dc46a8b68de1cb039c0bcf007a (diff)
downloadzsh-eeab4e5186961f9af591d0264d96f0e39d154886.tar.gz
zsh-eeab4e5186961f9af591d0264d96f0e39d154886.tar.bz2
zsh-eeab4e5186961f9af591d0264d96f0e39d154886.zip
feat(updater): add changelog display by parsing the commit list
Diffstat (limited to 'tools/upgrade.sh')
-rwxr-xr-xtools/upgrade.sh7
1 files changed, 7 insertions, 0 deletions
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