Skip to content

Commit 8b7e58c

Browse files
authored
chore: use os specific line endings for version updates (open-telemetry#763)
On windows (with git config core.autocrlf=true as recommended for cross os projects) the version-update script created unix files (LF only). This caused that git sees a lot modified files after bootstrap. Use os.EOL to ensure line endings match the os used.
1 parent de4c19e commit 8b7e58c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/version-update.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
const fs = require('fs');
18+
const os = require('os');
1819
const path = require('path');
1920

2021
const appRoot = process.cwd();
@@ -44,4 +45,4 @@ export const VERSION = '${pjson.version}';
4445

4546
const fileUrl = path.join(appRoot, "src", "version.ts")
4647

47-
fs.writeFileSync(fileUrl, content);
48+
fs.writeFileSync(fileUrl, content.replace(/\n/g, os.EOL));

0 commit comments

Comments
 (0)