From b4fb9bb51f774452f4cc2afadd9775f21241f4c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Nov 2023 23:54:45 -0800 Subject: [PATCH] chore: add manifest bumper script --- .github/actions/bump-manifest-version.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/bump-manifest-version.js b/.github/actions/bump-manifest-version.js index e69de29..3ce3ede 100644 --- a/.github/actions/bump-manifest-version.js +++ b/.github/actions/bump-manifest-version.js @@ -0,0 +1,11 @@ +// Based off of https://github.com/overextended/ox_lib/blob/master/.github/actions/bump-manifest-version.js +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) \ No newline at end of file