feat(updater): add changelog display by parsing the commit list

This commit is contained in:
Marc Cornellà
2020-11-01 00:26:03 +01:00
parent e093a4cf62
commit eeab4e5186
2 changed files with 425 additions and 0 deletions

View File

@@ -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