Skip to content

Commit

Permalink
Spitting fire
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansturmer committed Nov 9, 2016
1 parent e05536f commit cc8a121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('-');
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cc8a121

Please sign in to comment.