Adding version handling to CLI, #8335 - useful to see what version of CLI currently installed.
This commit is contained in:
parent
5e495c6b9c
commit
e52db23142
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
require("./prebuilds")
|
||||
require("./environment")
|
||||
const json = require("../package.json")
|
||||
const { getCommands } = require("./options")
|
||||
const { Command } = require("commander")
|
||||
const { getHelpDescription } = require("./utils")
|
||||
|
@ -10,7 +11,7 @@ async function init() {
|
|||
const program = new Command()
|
||||
.addHelpCommand("help", getHelpDescription("Help with Budibase commands."))
|
||||
.helpOption(false)
|
||||
program.helpOption()
|
||||
.version(json.version)
|
||||
// add commands
|
||||
for (let command of getCommands()) {
|
||||
command.configure(program)
|
||||
|
|
Loading…
Reference in New Issue