From 23a4baf591b58eb4e983b6178f4483fc577119cd Mon Sep 17 00:00:00 2001 From: linsui <2873532-linsui@users.noreply.gitlab.com> Date: Mon, 16 Sep 2024 00:21:52 +0800 Subject: [PATCH] keep-latest script: only check added and modified files --- tools/keep-latest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/keep-latest.sh b/tools/keep-latest.sh index 4f72a87ac9..cfdd727565 100755 --- a/tools/keep-latest.sh +++ b/tools/keep-latest.sh @@ -5,7 +5,7 @@ set -e last_commit=$(git log --grep='Update known apks' | grep commit | head -n 1 | sed -E -n 's/commit (.*)/\1/p') echo "Last known apks update at: $last_commit" echo "HEAD at: $(git rev-parse HEAD)" -changed_files=$(git diff --name-only "$last_commit" HEAD) +changed_files=$(git diff --name-only --diff-filter=AM "$last_commit" HEAD) for file in $changed_files; do grep -q "AutoUpdateMode: None" $file && continue