From 23839f2ec76fc976d7da65f1c5bcdf5ca661a83a Mon Sep 17 00:00:00 2001 From: suyx Date: Tue, 28 Jul 2026 14:59:23 +0800 Subject: [PATCH] fix: normalize generated text in Windows CI --- .gitattributes | 2 ++ scripts/verify-ci-isolation.mjs | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 632e222..cb27c78 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ +* text=auto eol=lf + # Frozen inputs must retain their committed bytes on every platform. /PRD.md -text /FeatureSummary.md -text diff --git a/scripts/verify-ci-isolation.mjs b/scripts/verify-ci-isolation.mjs index 88d0170..9dab200 100644 --- a/scripts/verify-ci-isolation.mjs +++ b/scripts/verify-ci-isolation.mjs @@ -7,6 +7,7 @@ const workflow = readFileSync(".gitea/workflows/p0a-ci.yml", "utf8"); const gitAttributes = readFileSync(".gitattributes", "utf8"); const escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +assert.match(gitAttributes, /^\*\s+text=auto\s+eol=lf\s*$/m); const frozenBytePaths = [...Object.keys(manifest.source_hashes), "tasks.manifest.json"]; for (const path of frozenBytePaths) { assert.match(gitAttributes, new RegExp(`^/${escapeRegExp(path)}\\s+-text\\s*$`, "m"));