fix: normalize generated text in Windows CI
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 6m44s

This commit is contained in:
suyx
2026-07-28 14:59:23 +08:00
parent 9d36ca3e94
commit 23839f2ec7
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1,3 +1,5 @@
* text=auto eol=lf
# Frozen inputs must retain their committed bytes on every platform. # Frozen inputs must retain their committed bytes on every platform.
/PRD.md -text /PRD.md -text
/FeatureSummary.md -text /FeatureSummary.md -text
+1
View File
@@ -7,6 +7,7 @@ const workflow = readFileSync(".gitea/workflows/p0a-ci.yml", "utf8");
const gitAttributes = readFileSync(".gitattributes", "utf8"); const gitAttributes = readFileSync(".gitattributes", "utf8");
const escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); 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"]; const frozenBytePaths = [...Object.keys(manifest.source_hashes), "tasks.manifest.json"];
for (const path of frozenBytePaths) { for (const path of frozenBytePaths) {
assert.match(gitAttributes, new RegExp(`^/${escapeRegExp(path)}\\s+-text\\s*$`, "m")); assert.match(gitAttributes, new RegExp(`^/${escapeRegExp(path)}\\s+-text\\s*$`, "m"));