mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
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:
@@ -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");
|
||||
|
||||
|
||||
@@ -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) || "";
|
||||
Reference in New Issue
Block a user