feat: Mobile settings screen (#34) (#101)

This commit was merged in pull request #101.
This commit is contained in:
2026-03-23 22:07:04 +00:00
parent 74522c56dd
commit 2ed21eebb2
6 changed files with 298 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
const fs = require("fs");
const path = require("path");
const { spawn } = require("child_process");
const { spawn, execSync } = require("child_process");
const { Readable } = require("stream");
const { pipeline } = require("stream/promises");
@@ -127,6 +127,15 @@ function getExpoPublicReplId() {
return process.env.REPL_ID || process.env.EXPO_PUBLIC_REPL_ID;
}
function getGitSha() {
try {
return execSync("git rev-parse HEAD", { cwd: workspaceRoot }).toString().trim();
} catch (error) {
console.warn("Could not get git commit hash:", error.message);
return "unknown";
}
}
async function startMetro(expoPublicDomain, expoPublicReplId) {
const isRunning = await checkMetroHealth();
if (isRunning) {
@@ -136,10 +145,12 @@ async function startMetro(expoPublicDomain, expoPublicReplId) {
console.log("Starting Metro...");
console.log(`Setting EXPO_PUBLIC_DOMAIN=${expoPublicDomain}`);
const gitSha = getGitSha();
const env = {
...process.env,
EXPO_PUBLIC_DOMAIN: expoPublicDomain,
EXPO_PUBLIC_REPL_ID: expoPublicReplId,
EXPO_PUBLIC_GIT_SHA: gitSha,
};
if (expoPublicReplId) {