mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-05-10 16:25:22 +00:00
feat(build): skip backend-manifest.json during macOS universal builds to ensure identical non-binary files
This commit is contained in:
+2
-2
@@ -105,7 +105,7 @@ The project favors predictable SQL behavior and explicit migration control, whic
|
||||
- Auth and access-attempt tracking integrated with IP/User-Agent aware controls
|
||||
- Debug endpoints provide visibility into logs and access-attempt records
|
||||
|
||||
This is also very well tested, but I still would not recommend exposing MeshChatX to the internet.
|
||||
This is also very well tested, but I still would not recommend exposing MeshChatX to the internet.
|
||||
|
||||
## Security Model
|
||||
|
||||
@@ -155,4 +155,4 @@ When adding features, prefer:
|
||||
|
||||
- identity-scoped state over global mutable state,
|
||||
- explicit migration/version changes for DB schema updates,
|
||||
- endpoint-level tests plus focused manager unit tests.
|
||||
- endpoint-level tests plus focused manager unit tests.
|
||||
|
||||
+2
-1
@@ -141,7 +141,8 @@
|
||||
"from": "build/exe/darwin-${arch}",
|
||||
"to": "backend",
|
||||
"filter": [
|
||||
"**/*"
|
||||
"**/*",
|
||||
"!backend-manifest.json"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -122,7 +122,19 @@ try {
|
||||
stripPythonBytecodeArtifacts(buildDir);
|
||||
}
|
||||
const manifestPath = path.join(buildDir, "backend-manifest.json");
|
||||
generateManifest(buildDir, manifestPath);
|
||||
const skipManifest =
|
||||
process.env.MESHCHATX_SKIP_BACKEND_MANIFEST === "1" ||
|
||||
process.env.MESHCHATX_SKIP_BACKEND_MANIFEST === "true";
|
||||
if (skipManifest) {
|
||||
if (fs.existsSync(manifestPath)) {
|
||||
fs.unlinkSync(manifestPath);
|
||||
}
|
||||
console.log(
|
||||
"Skipping backend-manifest.json (MESHCHATX_SKIP_BACKEND_MANIFEST); universal merge requires identical non-binary files."
|
||||
);
|
||||
} else {
|
||||
generateManifest(buildDir, manifestPath);
|
||||
}
|
||||
} else {
|
||||
console.error(`Build directory not found (${buildDir}), manifest generation skipped.`);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,12 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
# @electron/universal merges x64 and arm64 app bundles and requires every non-binary
|
||||
# file present in both trees to have identical bytes. Per-arch backend-manifest.json
|
||||
# contents always differ, so skip embedding it here; electron/main.js treats a missing
|
||||
# manifest as "skip integrity check" (see verifyBackendIntegrity).
|
||||
export MESHCHATX_SKIP_BACKEND_MANIFEST=1
|
||||
|
||||
pnpm run electron-postinstall
|
||||
pnpm run version:sync
|
||||
pnpm run build-frontend
|
||||
|
||||
Reference in New Issue
Block a user