From 476b507bb61ed403efe83c5f637d7d8e65d3df33 Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Thu, 10 Mar 2022 13:14:46 +0530 Subject: [PATCH] fix(update): Skip logs starting with `(chore)` (#4800) * fix(update): Skip logs starting with `(chore)` * Update CHANGELOG.md --- CHANGELOG.md | 1 + libexec/scoop-update.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66373a2dbe..4e90b4b68e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - **installed:** If no `$global`, check both local and global installed ([#4798](https://github.com/ScoopInstaller/Scoop/issues/4798)) - **scoop-prefix:** Fix typo that breaks global installed apps ([#4795](https://github.com/ScoopInstaller/Scoop/issues/4795)) +- **update:** Skip logs starting with `(chore)` ([#4800](https://github.com/ScoopInstaller/Scoop/issues/4800)) ### Code Refactoring diff --git a/libexec/scoop-update.ps1 b/libexec/scoop-update.ps1 index f971017720..9e3aebdba3 100644 --- a/libexec/scoop-update.ps1 +++ b/libexec/scoop-update.ps1 @@ -111,7 +111,7 @@ function update_scoop() { $res = $lastexitcode if ($show_update_log) { - Invoke-Expression "git -C '$currentdir' --no-pager log --no-decorate --grep='^chore' --invert-grep --format='tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset' '$previousCommit..HEAD'" + Invoke-Expression "git -C '$currentdir' --no-pager log --no-decorate --grep='^(chore)' --invert-grep --format='tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset' '$previousCommit..HEAD'" } if ($res -ne 0) { @@ -148,7 +148,7 @@ function update_scoop() { $previousCommit = (Invoke-Expression "git -C '$bucketLoc' rev-parse HEAD") git_cmd -C "`"$bucketLoc`"" pull -q if ($show_update_log) { - Invoke-Expression "git -C '$bucketLoc' --no-pager log --no-decorate --grep='^chore' --invert-grep --format='tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset' '$previousCommit..HEAD'" + Invoke-Expression "git -C '$bucketLoc' --no-pager log --no-decorate --grep='^(chore)' --invert-grep --format='tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset' '$previousCommit..HEAD'" } }