From d91b4926581a800a61c3b7a3d2fa8a7189e8cb09 Mon Sep 17 00:00:00 2001 From: "qbox-duck[bot]" <152818034+qbox-duck[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 02:31:47 +0000 Subject: [PATCH] chore: synced local './' with remote 'repo-template/' --- .github/actions/bump-manifest-version.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/bump-manifest-version.js b/.github/actions/bump-manifest-version.js index c7895c7..2980cfc 100644 --- a/.github/actions/bump-manifest-version.js +++ b/.github/actions/bump-manifest-version.js @@ -5,10 +5,11 @@ const newVersion = version.replace('v', '') const manifestFile = fs.readFileSync('fxmanifest.lua', {encoding: 'utf8'}) -let newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, `version '${newVersion}'`) +const versionStr = `version '${newVersion}'` +let newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, versionStr) -if (newFileContent == manifestFile) { - newFileContent = manifestFile.replace(/\bgame\s+(.*)$/gm, `game 'gta5'\nversion '${newVersion}'`); +if (!newFileContent.includes(versionStr)) { + newFileContent = manifestFile.replace(/\bgame\s+(.*)$/gm, `game 'gta5'\n${versionStr}`); } fs.writeFileSync('fxmanifest.lua', newFileContent) \ No newline at end of file