chore: use os specific line endings for version updates (#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.
This commit is contained in:
parent
de4c19ee0e
commit
8b7e58c408
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const appRoot = process.cwd();
|
||||
|
|
@ -44,4 +45,4 @@ export const VERSION = '${pjson.version}';
|
|||
|
||||
const fileUrl = path.join(appRoot, "src", "version.ts")
|
||||
|
||||
fs.writeFileSync(fileUrl, content);
|
||||
fs.writeFileSync(fileUrl, content.replace(/\n/g, os.EOL));
|
||||
|
|
|
|||
Loading…
Reference in New Issue