refactor(mobile): moved the versioning lookup at at the mobile folder plus renamed
This commit is contained in:
@@ -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")}`;
|
||||
|
||||
|
||||
@@ -15,13 +15,12 @@
|
||||
"backgroundColor": "#E6F4FE",
|
||||
"foregroundImage": "./assets/images/android-icon-foreground.png",
|
||||
"backgroundImage": "./assets/images/android-icon-background.png",
|
||||
"monochromeImage": "./assets/images/android-icon-monochrome.png",
|
||||
"package": "net.alpla.lst.mobile"
|
||||
|
||||
"monochromeImage": "./assets/images/android-icon-monochrome.png"
|
||||
},
|
||||
"versionCode": 5,
|
||||
"minSupportedVersionCode": 1,
|
||||
"predictiveBackGestureEnabled": false,
|
||||
"package": "com.anonymous.lstMobile"
|
||||
"package": "net.alpla.lst.mobile"
|
||||
},
|
||||
"web": {
|
||||
"output": "static",
|
||||
|
||||
@@ -2,8 +2,12 @@ const { withDangerousMod } = require("@expo/config-plugins");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const packageName = "com.anonymous.lstMobile";
|
||||
const packagePath = "com/anonymous/lstMobile";
|
||||
// const packageName = "net.alpla.lst.mobile";
|
||||
// const packagePath = "com/alpla/lst/mobile";
|
||||
const packageName = "net.alpla.lst.mobile";
|
||||
const packagePath = "net/alpla/lst/mobile";
|
||||
// const packageName = config.android?.package;
|
||||
// const packagePath = packageName.replace(/\./g, "/");
|
||||
|
||||
const moduleCode = `package ${packageName}.scanner
|
||||
|
||||
|
||||
889
package-lock.json
generated
889
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -65,6 +65,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@dotenvx/dotenvx": "^1.57.0",
|
||||
"@expo/config": "^55.0.15",
|
||||
"@scalar/express-api-reference": "^0.9.4",
|
||||
"@socket.io/admin-ui": "^0.5.1",
|
||||
"archiver": "^7.0.1",
|
||||
|
||||
Reference in New Issue
Block a user