Skip to content

Commit 0a26fa9

Browse files
committed
define version in the main object
1 parent 59f9d9f commit 0a26fa9

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

lib/cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var colors = require('colors');
33

44
var Cmd = function(Embark) {
55
this.Embark = Embark;
6-
program.version('2.1.3');
6+
program.version(Embark.version);
77
};
88

99
Cmd.prototype.process = function(args) {

lib/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ var IPFS = require('./ipfs.js');
2626

2727
var Embark = {
2828

29+
version: '2.1.3',
30+
2931
process: function(args) {
3032
var cmd = new Cmd(Embark);
3133
cmd.process(args);
@@ -66,7 +68,7 @@ var Embark = {
6668
function welcome(callback) {
6769
if (!options.useDashboard) {
6870
console.log('========================'.bold.green);
69-
console.log('Welcome to Embark 2.1.3'.yellow.bold);
71+
console.log(('Welcome to Embark ' + Embark.version).yellow.bold);
7072
console.log('========================'.bold.green);
7173
}
7274
callback();
@@ -96,7 +98,8 @@ var Embark = {
9698
config: Embark.config,
9799
serverHost: options.serverHost,
98100
serverPort: options.serverPort,
99-
runWebserver: options.runWebserver
101+
runWebserver: options.runWebserver,
102+
version: Embark.version
100103
});
101104
Embark.servicesMonitor.startMonitor();
102105
callback();

lib/services.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var ServicesMonitor = function(options) {
99
this.serverHost = options.serverHost || 'localhost';
1010
this.serverPort = options.serverPort || 8000;
1111
this.runWebserver = options.runWebserver;
12+
this.version = options.version;
1213
};
1314

1415
ServicesMonitor.prototype.startMonitor = function() {
@@ -30,7 +31,7 @@ ServicesMonitor.prototype.check = function() {
3031
},
3132
function addEmbarkVersion(web3, result, callback) {
3233
self.logger.trace('addEmbarkVersion');
33-
result.push('Embark 2.1.3'.green);
34+
result.push(('Embark ' + self.version).green);
3435
callback(null, web3, result);
3536
},
3637
function checkEthereum(web3, result, callback) {

0 commit comments

Comments
 (0)