ci(create-release): restructure and update versions

This commit is contained in:
ANTOND.
2025-05-02 16:31:52 +02:00
parent 9c9cb7e4e4
commit 17f38dfd31
3 changed files with 61 additions and 62 deletions
+6 -6
View File
@@ -1,10 +1,10 @@
const fs = require('fs')
const fs = require('fs');
const version = process.env.TGT_RELEASE_VERSION
const newVersion = version.replace('v', '')
const version = process.env.TGT_RELEASE_VERSION;
const newVersion = version.replace('v', '');
const manifestFile = fs.readFileSync('fxmanifest.lua', {encoding: 'utf8'})
const manifestFile = fs.readFileSync('fxmanifest.lua', { encoding: 'utf8' });
const newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, `version '${newVersion}'`)
const newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, `version '${newVersion}'`);
fs.writeFileSync('fxmanifest.lua', newFileContent)
fs.writeFileSync('fxmanifest.lua', newFileContent);
+10
View File
@@ -0,0 +1,10 @@
const fs = require('fs');
const version = process.env.TGT_RELEASE_VERSION;
const newVersion = version.replace('v', '');
const packageFile = fs.readFileSync('package/package.json', { encoding: 'utf8' });
const newFileContent = packageFile.replace(/"version":\s+"(.*)",$/gm, `"version": "${newVersion}",`);
fs.writeFileSync('package/package.json', newFileContent);