frontend/versionbuilder.js
2023-04-12 21:35:32 +02:00

6 lines
345 B
JavaScript

import fs from 'fs';
const packagejson = JSON.parse(fs.readFileSync(`./package.json`, { encoding: 'utf-8' }));
const original = fs.readFileSync(`./index.html`, { encoding: 'utf-8' });
let out = original.replace(/RELEASE_INFO-(\S)+-RELEASE_INFO/gi, 'RELEASE_INFO-' + packagejson.version + '-RELEASE_INFO');
fs.writeFileSync(`./index.html`, out);