Sort out windows CRLF mess

This commit is contained in:
Paolo Tranquilli
2025-09-09 14:00:28 +02:00
parent 1b8f0ffedf
commit 0c065fa4cf
3 changed files with 8 additions and 4 deletions

View File

@@ -26,6 +26,10 @@ jobs:
timeout-minutes: 45
steps:
- name: Prepare git (Windows)
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- uses: actions/checkout@v5
- name: Set up Node.js

View File

@@ -240,7 +240,7 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
})
raw_file = this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml.raw"
with open(raw_file, 'w') as output_stream:
with open(raw_file, 'w', newline='\n') as output_stream:
writeHeader(output_stream)
yaml.dump({
'name': f"PR Check - {checkSpecification['name']}",
@@ -274,7 +274,7 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
}, output_stream)
with open(raw_file, 'r') as input_stream:
with open(this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml", 'w') as output_stream:
with open(this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml", 'w', newline='\n') as output_stream:
content = input_stream.read()
output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+['']))
os.remove(raw_file)
@@ -328,7 +328,7 @@ for collection_name in collections:
}, output_stream)
with open(raw_file, 'r') as input_stream:
with open(this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml", 'w') as output_stream:
with open(this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml", 'w', newline='\n') as output_stream:
content = input_stream.read()
output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+['']))
os.remove(raw_file)

View File

@@ -3,7 +3,7 @@ set -e
cd "$(dirname "$0")"
python3 -m venv env
source env/bin/activate
source env/*/activate
pip3 install ruamel.yaml==0.17.31
python3 sync.py