refactor(mobile): moved the versioning lookup at at the mobile folder plus renamed

This commit is contained in:
2026-04-26 18:33:28 -05:00
parent 77b4533dea
commit bddc9aca0d
5 changed files with 901 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ import fs from "node:fs";
import { Router } from "express";
import path from "path";
import { fileURLToPath } from "url";
import { getConfig } from "@expo/config";
const router = Router();
@@ -9,15 +10,19 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const downloadDir = path.resolve(__dirname, "../../downloads/mobile");
const projectRoot = path.resolve("./lstMobile"); // adjust if needed
const { exp } = getConfig(projectRoot);
const currentApk = {
packageName: "net.alpla.lst.mobile",
versionName: "0.0.1-alpha",
versionCode: 1,
minSupportedVersionCode: 1,
fileName: "lst-mobile.apk",
packageName: exp.android?.package,
versionName: exp.version,
versionCode: exp.android?.versionCode,
minSupportedVersionCode: 1, // keep this custom if needed
fileName: "lst-mobile.apk",
};
router.get("/version", async (req, res) => {
const baseUrl = `${req.protocol}://${req.get("host")}`;