From 270db708059909b575cd747789580f8a3dbf7baa Mon Sep 17 00:00:00 2001 From: Logicer <81077770+Logicer16@users.noreply.github.com> Date: Sat, 12 Jun 2021 13:03:21 +1000 Subject: fix(update): correct description of how changelog is displayed (#9943) --- tools/upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 417e06fe8..38fac3ce0 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -72,7 +72,7 @@ if git pull --rebase --stat origin master; then # Save the commit prior to updating git config oh-my-zsh.lastVersion "$last_commit" - # Display changelog with less if available, otherwise just print it to the terminal + # Print changelog to the terminal if [[ "$1" = --interactive ]]; then "$ZSH/tools/changelog.sh" HEAD "$last_commit" fi -- cgit v1.2.3-70-g09d2 From 0e7d7b87f33b5ec8c75a3a0a9b16fae082d06348 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 7 Jul 2021 10:40:05 +0200 Subject: feat(changelog): ignore merge commits --- tools/changelog.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/changelog.sh b/tools/changelog.sh index 836afef14..56ea42cb1 100755 --- a/tools/changelog.sh +++ b/tools/changelog.sh @@ -114,6 +114,11 @@ function parse-commit { fi } + # Ignore commit if it is a merge commit + if [[ $(command git show -s --format=%p $1 | wc -w) -gt 1 ]]; then + return + fi + # Parse commit with hash $1 local hash="$1" subject body warning rhash subject="$(command git show -s --format=%s $hash)" -- cgit v1.2.3-70-g09d2 From 36f444ed7325720ec05f182781ec7d6c9a4d675c Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 8 Jul 2021 16:11:16 +0200 Subject: fix(update): fix error exit code on update check (#10033) This patch removes the 'exit 1' status code when the update check finishes or is ended with CTRL+C. Fixes #10033 --- tools/check_for_upgrade.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 29a48b880..e87da3487 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -48,14 +48,17 @@ function update_ohmyzsh() { return fi - # Remove lock directory on exit. `return 1` is important for when trapping a SIGINT: + # Remove lock directory on exit. `return $ret` is important for when trapping a SIGINT: # The return status from the function is handled specially. If it is zero, the signal is # assumed to have been handled, and execution continues normally. Otherwise, the shell # will behave as interrupted except that the return status of the trap is retained. + # This means that for a CTRL+C, the trap needs to return the same exit status so that + # the shell actually exits what it's running. trap " - unset -f current_epoch update_last_updated_file update_ohmyzsh - command rm -rf '$ZSH/log/update.lock' - return 1 + ret=\$? + unset -f current_epoch update_last_updated_file update_ohmyzsh 2>/dev/null + command rm -rf '$ZSH/log/update.lock' + return \$ret " EXIT INT QUIT # Create or update .zsh-update file if missing or malformed -- cgit v1.2.3-70-g09d2