mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 15:50:25 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { createRequire } from "node:module";
|
||||
|
||||
declare const __CLAWDBOT_VERSION__: string | undefined;
|
||||
declare const __OPENCLAW_VERSION__: string | undefined;
|
||||
|
||||
function readVersionFromPackageJson(): string | null {
|
||||
try {
|
||||
@@ -12,11 +12,11 @@ function readVersionFromPackageJson(): string | null {
|
||||
}
|
||||
}
|
||||
|
||||
// Single source of truth for the current moltbot version.
|
||||
// Single source of truth for the current OpenClaw version.
|
||||
// - Embedded/bundled builds: injected define or env var.
|
||||
// - Dev/npm builds: package.json.
|
||||
export const VERSION =
|
||||
(typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
|
||||
process.env.CLAWDBOT_BUNDLED_VERSION ||
|
||||
(typeof __OPENCLAW_VERSION__ === "string" && __OPENCLAW_VERSION__) ||
|
||||
process.env.OPENCLAW_BUNDLED_VERSION ||
|
||||
readVersionFromPackageJson() ||
|
||||
"0.0.0";
|
||||
|
||||
Reference in New Issue
Block a user