mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-11-15 18:13:00 +00:00
13 lines
500 B
JavaScript
13 lines
500 B
JavaScript
|
const path = require('path');
|
||
|
const fs = require('fs');
|
||
|
const appVersion = require('./package.json').version;
|
||
|
const versionFilePath = path.join(__dirname + '/src/environments/version.ts');
|
||
|
const versionStr = `export const VERSION = '${appVersion}';`;
|
||
|
fs.writeFile(versionFilePath, versionStr, { flat: 'w' }, function (err) {
|
||
|
if (err) {
|
||
|
return console.log(err);
|
||
|
}
|
||
|
console.log(`Updating application version ${appVersion}`);
|
||
|
console.log(`${'Writing version module to '}${versionFilePath}\n`);
|
||
|
});
|