new command: version

Massimo Melina committed Aug 5, 2022 at 11:00 UTC cc801684566b6869e0ed950c1672bd10e9ccce9c
1 file changed +9 -1
server/src/commands.ts
+9 -1
@@ -3,6 +3,7 @@ import { getConfig, getConfigDefinition, setConfig } from './config'
3 import _ from 'lodash'
4 import { getUpdate, update } from './update'
5 import yaml from 'yaml'
6 +import { BUILD_TIMESTAMP, VERSION } from './const'
7
8 console.log(`HINT: type "help" for help`)
9 require('readline').createInterface({ input: process.stdin }).on('line', (line: string) => {
@@ -90,5 +91,12 @@ const commands = {
91 const update = await getUpdate()
92 console.log("new version available", update.name)
93 }
93 - }
94 + },
95 + version: {
96 + params: '',
97 + async cb() {
98 + console.log(VERSION)
99 + console.log(BUILD_TIMESTAMP)
100 + }
101 + },
102 }