From cc8a121ac198c53fbc489285d9420dab1e251dfa Mon Sep 17 00:00:00 2001 From: Ryan Sturmer Date: Wed, 9 Nov 2016 04:20:08 +0000 Subject: [PATCH] Spitting fire --- engine.js | 2 +- updater.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine.js b/engine.js index 419fec3..f46c023 100644 --- a/engine.js +++ b/engine.js @@ -5,6 +5,7 @@ var log = require('./log').logger('engine'); exports.getVersion = function(callback) { + var version = {number : 'v0.0.0'}; return require('./util').doshell_promise("git describe --dirty=! --match='v*.*.*'", {cwd : config.updater.get('engine_dir'), silent : true}) .then(function(data) { parts = data.split('-'); @@ -17,7 +18,6 @@ exports.getVersion = function(callback) { callback(null, version); }).catch(function(err) { fs.readFile(path.join(config.updater.get('engine_dir'), 'version.json'), 'utf8', function(err, data) { - var version = {number : 'v0.0.0'}; if(err) { return callback(null, version); } diff --git a/updater.js b/updater.js index 01259b0..113b820 100644 --- a/updater.js +++ b/updater.js @@ -50,9 +50,9 @@ var Updater = function() util.inherits(Updater, events.EventEmitter); Updater.prototype.getVersion = function(callback) { + this.version = {number : 'v0.0.0'}; require('./util').doshell_promise("git describe --dirty=! --match='v*.*.*'", {cwd : __dirname, silent: true}) .then(function(data) { - this.version = {number : 'v0.0.0'}; parts = data.split('-'); if(parts.length === 1) { var versionString = parts[0].trim();