Files
oxmysql/.github/actions/bump-manifest-version.js
T
2022-07-28 14:54:38 +10:00

11 lines
349 B
JavaScript

const fs = require('fs');
const version = process.env.TGT_RELEASE_VERSION;
const newVersion = version.replace('v', '');
const manifestFile = fs.readFileSync('fxmanifest.lua', { encoding: 'utf8' });
const newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, `version '${newVersion}'`);
fs.writeFileSync('fxmanifest.lua', newFileContent);