mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
ci(create-release): restructure and update versions
This commit is contained in:
12
.github/actions/bump-manifest-version.js
vendored
12
.github/actions/bump-manifest-version.js
vendored
@@ -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
.github/actions/bump-package-version.js
vendored
Normal file
10
.github/actions/bump-package-version.js
vendored
Normal 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);
|
||||
Reference in New Issue
Block a user