fix: normalize generated text in Windows CI
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 6m44s
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 6m44s
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* text=auto eol=lf
|
||||
|
||||
# Frozen inputs must retain their committed bytes on every platform.
|
||||
/PRD.md -text
|
||||
/FeatureSummary.md -text
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user