mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 18:00:44 +01:00
0d3ff90977
Merging Angular pre-build code
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`);
|
|
});
|