From 2e56bda3372ed022effcb1114fab24f74304c926 Mon Sep 17 00:00:00 2001 From: Raghu Saxena Date: Sun, 18 Sep 2022 22:27:10 +0800 Subject: [PATCH] Add version --- bin/index.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/index.mjs b/bin/index.mjs index e468656..3bc7ecf 100755 --- a/bin/index.mjs +++ b/bin/index.mjs @@ -10,6 +10,7 @@ import { tagErroredTorrents } from '../build/src/racing/tag.js' import { postRaceResumeV2 } from '../build/src/racing/completed.js' import { startMetricsServer } from '../build/src/server/appFactory.js'; import { addTorrentToRace } from '../build/src/racing/add.js'; +import data from '../package.json' assert { type: 'json' }; // This should take care of having a base config makeConfigIfNotExist(); @@ -69,6 +70,8 @@ program.command('metrics').description('Start a prometheus metrics server').acti startMetricsServer(config, api); }) -// TODO: Add -v / --version +program.option('-v, --version', 'Display the version').action(() => { + console.log(`\n\nqbit-race version ${data.version}\n\n`); +}) program.parse();