Skip to content

Commit

Permalink
Add version
Browse files Browse the repository at this point in the history
  • Loading branch information
ckcr4lyf committed Sep 18, 2022
1 parent 1a2dbf0 commit 2e56bda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();

0 comments on commit 2e56bda

Please sign in to comment.