From bc10b3a074576bc4bf27148808cfde1f3420f3e0 Mon Sep 17 00:00:00 2001 From: s41r4j Date: Thu, 29 Jan 2026 00:03:04 +0530 Subject: [PATCH] chore: enable dynamic version check from git tags in whoami --- bin/lib/commands/whoami.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/lib/commands/whoami.js b/bin/lib/commands/whoami.js index 170008f..1454808 100644 --- a/bin/lib/commands/whoami.js +++ b/bin/lib/commands/whoami.js @@ -8,6 +8,12 @@ class WhoAmICommand { async run() { const pkg = require('../../../package.json'); + + // Get SSOT version from S4 (Tags) + const { S4Versioning } = require('../utils/s4'); + const s4 = new S4Versioning(this.git); + const version = (await s4.getCurrentVersion()) || pkg.version; + const user = os.userInfo().username; const hostname = os.hostname(); const platform = os.platform(); @@ -32,7 +38,7 @@ class WhoAmICommand { console.log(`└─ Email: ${color.cyan(gitEmail)}`); console.log(`\n${color.green('TOOL_METRICS')}`); - console.log(`├─ Version: ${color.magenta(pkg.version)}`); + console.log(`├─ Version: ${color.magenta(version)}`); console.log(`├─ Engine: Node ${process.version}`); console.log(`└─ Author: ${pkg.author}`);