devops: switch to LF line-endings in Git for text files (#10292)
Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
1c9c0dc2e6
commit
fd3ec50cf6
4
.gitattributes
vendored
4
.gitattributes
vendored
|
|
@ -1,3 +1,3 @@
|
|||
# text files must be lf for golden file tests to work
|
||||
*.txt eol=lf
|
||||
*.json eol=lf
|
||||
* text=auto eol=lf
|
||||
|
||||
|
|
|
|||
|
|
@ -294,8 +294,6 @@ validator_ts.push(`
|
|||
let hasChanges = false;
|
||||
|
||||
function writeFile(filePath, content) {
|
||||
if (os.platform() === 'win32')
|
||||
content = content.replace(/\r\n/g, '\n').replace(/\n/g, '\r\n');
|
||||
const existing = fs.readFileSync(filePath, 'utf8');
|
||||
if (existing === content)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue