From 4861716727b97e582a566ddc5c2f603ae6046f71 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Fri, 24 Feb 2023 13:31:09 +0800 Subject: [PATCH] chore: check alteration diff for new files only --- .scripts/check-alterations-sequence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/check-alterations-sequence.js b/.scripts/check-alterations-sequence.js index 8c24ad555..080254fd1 100644 --- a/.scripts/check-alterations-sequence.js +++ b/.scripts/check-alterations-sequence.js @@ -14,7 +14,7 @@ const allAlterations = execSync("pnpm cli db alter list", { .filter((filename) => Boolean(filename)) .map((filename) => filename.replace(".js", "")); -const diffFiles = execSync("git diff --name-only HEAD HEAD~1", { +const diffFiles = execSync("git diff HEAD~1 HEAD --name-only --diff-filter=ACR", { encoding: "utf-8", }); const committedAlterations = diffFiles