Skip to content

Commit

Permalink
chore: synced local './' with remote 'repo-template/'
Browse files Browse the repository at this point in the history
  • Loading branch information
qbox-duck[bot] authored Sep 20, 2024
1 parent 6248fe0 commit 8976e40
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/actions/bump-manifest-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8976e40

Please sign in to comment.