From a99ee73ef8c3e6603bc2d13c5174703e7d4dae98 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 19 Dec 2017 10:20:05 -0500 Subject: [PATCH] add version command --- lib/cmd.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/cmd.js b/lib/cmd.js index e70f0897..446c2ee6 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -17,6 +17,7 @@ class Cmd { this.simulator(); this.test(); this.upload(); + this.versionCmd(); this.otherCommands(); //If no arguments are passed display help by default @@ -156,6 +157,16 @@ class Cmd { }); } + versionCmd() { + program + .command('version') + .description('output the version number') + .action(function () { + console.log(embark.version); + process.exit(0); + }); + } + otherCommands() { program .action(function (env) {