Skip to content

Commit 1380114

Browse files
committed
fix(cli): read version from package.json instead of hardcoded constant
1 parent 263c052 commit 1380114

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/cli/program.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Command } from "commander";
2+
import packageJson from "../../package.json" with { type: "json" };
23
import { buildCommander } from "./define-command.js";
34
import type { CommandDef } from "./define-command.js";
45
import { validateCommand } from "./commands/validate.js";
@@ -19,16 +20,14 @@ import { taskCommand } from "./commands/task.js";
1920
import { planCommand } from "./commands/plan.js";
2021
import { syncCommandDef } from "./commands/sync.js";
2122

22-
const VERSION = "1.0.0";
23-
2423
export const program = new Command();
2524

2625
program
2726
.name("sysprom")
2827
.description(
2928
"System Provenance Model CLI — record where every part of a system came from",
3029
)
31-
.version(VERSION)
30+
.version(packageJson.version)
3231
.showHelpAfterError(true);
3332

3433
export const commands: CommandDef[] = [

0 commit comments

Comments
 (0)