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 { Router } from "express";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
|
import { getConfig } from "@expo/config";
|
||||||
|
|
||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
@@ -9,15 +10,19 @@ const __filename = fileURLToPath(import.meta.url);
|
|||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
const downloadDir = path.resolve(__dirname, "../../downloads/mobile");
|
const downloadDir = path.resolve(__dirname, "../../downloads/mobile");
|
||||||
|
const projectRoot = path.resolve("./lstMobile"); // adjust if needed
|
||||||
|
|
||||||
|
const { exp } = getConfig(projectRoot);
|
||||||
|
|
||||||
const currentApk = {
|
const currentApk = {
|
||||||
packageName: "net.alpla.lst.mobile",
|
packageName: exp.android?.package,
|
||||||
versionName: "0.0.1-alpha",
|
versionName: exp.version,
|
||||||
versionCode: 1,
|
versionCode: exp.android?.versionCode,
|
||||||
minSupportedVersionCode: 1,
|
minSupportedVersionCode: 1, // keep this custom if needed
|
||||||
fileName: "lst-mobile.apk",
|
fileName: "lst-mobile.apk",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
router.get("/version", async (req, res) => {
|
router.get("/version", async (req, res) => {
|
||||||
const baseUrl = `${req.protocol}://${req.get("host")}`;
|
const baseUrl = `${req.protocol}://${req.get("host")}`;
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,12 @@
|
|||||||
"backgroundColor": "#E6F4FE",
|
"backgroundColor": "#E6F4FE",
|
||||||
"foregroundImage": "./assets/images/android-icon-foreground.png",
|
"foregroundImage": "./assets/images/android-icon-foreground.png",
|
||||||
"backgroundImage": "./assets/images/android-icon-background.png",
|
"backgroundImage": "./assets/images/android-icon-background.png",
|
||||||
"monochromeImage": "./assets/images/android-icon-monochrome.png",
|
"monochromeImage": "./assets/images/android-icon-monochrome.png"
|
||||||
"package": "net.alpla.lst.mobile"
|
|
||||||
|
|
||||||
},
|
},
|
||||||
"versionCode": 5,
|
"versionCode": 5,
|
||||||
|
"minSupportedVersionCode": 1,
|
||||||
"predictiveBackGestureEnabled": false,
|
"predictiveBackGestureEnabled": false,
|
||||||
"package": "com.anonymous.lstMobile"
|
"package": "net.alpla.lst.mobile"
|
||||||
},
|
},
|
||||||
"web": {
|
"web": {
|
||||||
"output": "static",
|
"output": "static",
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ const { withDangerousMod } = require("@expo/config-plugins");
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const packageName = "com.anonymous.lstMobile";
|
// const packageName = "net.alpla.lst.mobile";
|
||||||
const packagePath = "com/anonymous/lstMobile";
|
// 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
|
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": {
|
"dependencies": {
|
||||||
"@dotenvx/dotenvx": "^1.57.0",
|
"@dotenvx/dotenvx": "^1.57.0",
|
||||||
|
"@expo/config": "^55.0.15",
|
||||||
"@scalar/express-api-reference": "^0.9.4",
|
"@scalar/express-api-reference": "^0.9.4",
|
||||||
"@socket.io/admin-ui": "^0.5.1",
|
"@socket.io/admin-ui": "^0.5.1",
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user