fix(ci): fix Windows line-ending CRLF diff issues in build-icons script and git checkout

This commit is contained in:
Praveen Bishnoi
2026-08-12 13:12:49 +05:30
parent e46196a007
commit f73ef478cc
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -29,6 +29,9 @@ jobs:
with:
persist-credentials: false
- name: Configure git line endings
run: git config --global core.autocrlf false
- name: Set up Python
uses: actions/setup-python@v5
with:
+2 -2
View File
@@ -566,11 +566,11 @@ def main() -> int:
md_chunks, gallery_chunks, misses = build()
MD_OUT.parent.mkdir(parents=True, exist_ok=True)
MD_OUT.write_text("".join(md_chunks), encoding="utf-8")
MD_OUT.write_bytes("".join(md_chunks).replace("\r\n", "\n").encode("utf-8"))
HTML_OUT.parent.mkdir(parents=True, exist_ok=True)
html = GALLERY_TEMPLATE.replace("{SECTIONS}", "\n".join(gallery_chunks))
HTML_OUT.write_text(html, encoding="utf-8")
HTML_OUT.write_bytes(html.replace("\r\n", "\n").encode("utf-8"))
total = sum(len(items) for items in ICONS.values())
print(f"\nDone. {total - len(misses)}/{total} fetched.", file=sys.stderr)