dbgate/setCurrentVersion.js

13 lines
322 B
JavaScript
Raw Normal View History

2020-12-10 12:31:37 +00:00
const fs = require('fs');
const packageJson = fs.readFileSync('app/package.json', { encoding: 'utf-8' });
const json = JSON.parse(packageJson);
const text = `
module.exports = {
version: '${json.version}',
buildTime: '${new Date().toISOString()}'
};
`;
fs.writeFileSync('packages/api/src/currentVersion.js', text);