2017-11-03 02:09:34 +02:00
|
|
|
const { BaseCommand } = require('./base-command.js');
|
|
|
|
const { Setting } = require('lib/models/setting.js');
|
|
|
|
const { _ } = require('lib/locale.js');
|
2017-07-10 22:03:46 +02:00
|
|
|
|
|
|
|
class Command extends BaseCommand {
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
return 'version';
|
|
|
|
}
|
|
|
|
|
|
|
|
description() {
|
2017-07-18 20:21:03 +02:00
|
|
|
return _('Displays version information');
|
2017-07-10 22:03:46 +02:00
|
|
|
}
|
|
|
|
|
2017-07-11 01:17:03 +02:00
|
|
|
async action(args) {
|
|
|
|
const p = require('./package.json');
|
2017-10-07 18:30:27 +02:00
|
|
|
this.stdout(_('%s %s (%s)', p.name, p.version, Setting.value('env')));
|
2017-07-10 22:03:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Command;
|