From 631413c6728fb788b11273e7aa28db98097e7b38 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sat, 12 Oct 2024 22:40:28 +0200 Subject: [PATCH] Create bump-web-version.js --- .github/actions/bump-web-version.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/actions/bump-web-version.js diff --git a/.github/actions/bump-web-version.js b/.github/actions/bump-web-version.js new file mode 100644 index 0000000..620cc6d --- /dev/null +++ b/.github/actions/bump-web-version.js @@ -0,0 +1,14 @@ +const fs = require("fs"); +const path = require('path'); +const replace = require('replace-in-file'); + +const version = process.env.TGT_RELEASE_VERSION; +const newVersion = version.replace("v", ""); + +const results = replace.sync({ + files: "fxmanifest.lua", + from: /\bversion\s+(.*)$/gm, + to: `version '${newVersion}'`, +}); + +console.log(results)