Replace lib/version.ts with APP_VERSION build arg injected via Docker

Remove the static package.json import in lib/version.ts and instead
pass APP_VERSION as a Docker build arg extracted from package.json by
the CI workflow. Both the builder and runner stages receive APP_VERSION
and GIT_COMMIT_SHA as environment variables, making runtime version
info available via process.env without bundling package.json into the
standalone output.
This commit is contained in:
2026-03-06 13:00:41 -05:00
parent 57ce0fd85d
commit fb24b25d34
5 changed files with 24 additions and 13 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { createLogger } from "@/lib/logger";
import { getSetting, setSetting } from "@/lib/services/settings";
import { APP_VERSION } from "@/lib/version";
const APP_VERSION = process.env.APP_VERSION || "0.0.0";
const log = createLogger("update-check");
-4
View File
@@ -1,4 +0,0 @@
import packageJson from "../package.json" with { type: "json" };
export const APP_VERSION = packageJson.version;
export const GIT_COMMIT = process.env.GIT_COMMIT_SHA?.slice(0, 7) || "";