balena-cli/build/actions/info.js

34 lines
845 B
JavaScript
Raw Normal View History

2015-02-26 15:47:56 +00:00
(function() {
2015-06-10 16:34:42 +00:00
var packageJSON, settings;
settings = require('resin-settings-client');
2015-02-26 15:47:56 +00:00
packageJSON = require('../../package.json');
exports.version = {
signature: 'version',
description: 'output the version number',
help: 'Display the Resin CLI version.',
action: function(params, options, done) {
console.log(packageJSON.version);
return done();
2015-02-26 15:47:56 +00:00
}
};
2015-06-10 16:34:42 +00:00
exports.config = {
signature: 'config',
description: 'see your current configuration',
help: 'See your current Resin CLI configuration.\n\nConfiguration lives in $HOME/.resin/config.',
action: function(params, options, done) {
var key, ref, value;
ref = settings.get();
for (key in ref) {
value = ref[key];
console.log(key + ": " + value);
}
return done();
}
};
2015-02-26 15:47:56 +00:00
}).call(this);