fix(ci): fix Windows line-ending CRLF diff issues in build-icons script and git checkout
This commit is contained in:
@@ -29,6 +29,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Configure git line endings
|
||||||
|
run: git config --global core.autocrlf false
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -566,11 +566,11 @@ def main() -> int:
|
|||||||
md_chunks, gallery_chunks, misses = build()
|
md_chunks, gallery_chunks, misses = build()
|
||||||
|
|
||||||
MD_OUT.parent.mkdir(parents=True, exist_ok=True)
|
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_OUT.parent.mkdir(parents=True, exist_ok=True)
|
||||||
html = GALLERY_TEMPLATE.replace("{SECTIONS}", "\n".join(gallery_chunks))
|
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())
|
total = sum(len(items) for items in ICONS.values())
|
||||||
print(f"\nDone. {total - len(misses)}/{total} fetched.", file=sys.stderr)
|
print(f"\nDone. {total - len(misses)}/{total} fetched.", file=sys.stderr)
|
||||||
|
|||||||
Reference in New Issue
Block a user