diff options
Diffstat (limited to 'apps/installer/utils.ts')
-rw-r--r-- | apps/installer/utils.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/installer/utils.ts b/apps/installer/utils.ts new file mode 100644 index 0000000000..90d70ec6a8 --- /dev/null +++ b/apps/installer/utils.ts @@ -0,0 +1,17 @@ +import * as path from "https://deno.land/std/path/mod.ts"; +import makeloc from "https://deno.land/x/dirname@1.1.2/mod.ts"; + +const { __dirname } = makeloc(import.meta); + +// specify the needed paths here +const ACORE_JSON = path.resolve(__dirname + "/../../acore.json"); + +export async function getAcoreReleaseVersion() { + // read the acore.json file to work with the versioning + const decoder = new TextDecoder("utf-8"); + //console.debug(`Open ${ACORE_JSON}`) + const data = await Deno.readFile(ACORE_JSON); + const acoreInfo = JSON.parse(decoder.decode(data)); + + return `AzerothCore Rev. ${acoreInfo.version}`; +} |