pre-release & release game version [to check]

This commit is contained in:
AMIAY
2026-01-23 17:54:57 +01:00
parent 08c2218cf8
commit 3983fdb1bc
19 changed files with 888 additions and 302 deletions

View File

@@ -1,9 +1,10 @@
const axios = require('axios');
async function getLatestClientVersion() {
async function getLatestClientVersion(branch = 'release') {
try {
console.log('Fetching latest client version from API...');
console.log(`Fetching latest client version from API (branch: ${branch})...`);
const response = await axios.get('https://files.hytalef2p.com/api/version_client', {
params: { branch },
timeout: 5000,
headers: {
'User-Agent': 'Hytale-F2P-Launcher'
@@ -12,7 +13,7 @@ async function getLatestClientVersion() {
if (response.data && response.data.client_version) {
const version = response.data.client_version;
console.log(`Latest client version: ${version}`);
console.log(`Latest client version for ${branch}: ${version}`);
return version;
} else {
console.log('Warning: Invalid API response, falling back to default version');