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:
Gerhard Stöbich 2020-02-04 19:16:13 +01:00 committed by GitHub
parent de4c19ee0e
commit 8b7e58c408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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));