Skip to content

Commit

Permalink
bring back git rev into appium output
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Feb 6, 2014
1 parent 2baf369 commit ccfbd07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/server/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ module.exports.noColorLogger = function (tokens, req, res) {
res.statusCode + ' ' + (new Date() - req._startTime) + 'ms' + len;
};

module.exports.configureServer = function (configFile, appiumRev, appiumVer,
appiumServer, cb) {
module.exports.configureServer = function (configFile, appiumVer, appiumServer,
cb) {
var appiumRev;
fs.readFile(configFile, function (err, data) {
if (err) {
logger.error("Could not find config file; looks like config hasn't " +
Expand Down Expand Up @@ -158,7 +159,7 @@ module.exports.configureServer = function (configFile, appiumRev, appiumVer,
return cb(new Error("Appium / config version mismatch"));
} else {
appiumServer.registerConfig(rawConfig);
cb(null);
cb(null, appiumRev);
}
});
};
Expand Down
6 changes: 5 additions & 1 deletion lib/server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ var main = function (args, readyCb, doneCb) {

async.series([
function (cb) {
configureServer(configFile, appiumRev, appiumVer, appiumServer, cb);
configureServer(configFile, appiumVer, appiumServer, function (err, rev) {
if (err) return cb(err);
appiumRev = rev;
cb();
});
},
function (cb) {
conditionallyPreLaunch(args, appiumServer, cb);
Expand Down

0 comments on commit ccfbd07

Please sign in to comment.