changing minimum required version for NodeBB to 0.10, and updated travis config. Allowing new setup option "ci", for TravisCI integration

v1.18.x
Julian Lam 11 years ago
parent e579db8bf3
commit 2627240d80

@ -6,5 +6,4 @@ before_install:
language: node_js
node_js:
- "0.11"
- "0.10"
- "0.8"
- "0.10"

@ -33,7 +33,7 @@ Credit: [Convoe](http://www.convoe.com), [Kano](http://www.kano.me), [Manchester
NodeBB requires the following software to be installed:
* A version of Node.js at least 0.8 or greater
* A version of Node.js at least 0.10 or greater
* Redis, version 2.6 or greater **or** MongoDB, version 2.4 or greater
* nginx, version 1.3.13 or greater (**only if** intending to use nginx to proxy requests to a NodeBB)

@ -79,7 +79,7 @@ var async = require('async'),
setup: function (callback) {
async.series([
function(next) {
function (next) {
// Check if the `--setup` flag contained values we can work with
var setupVal;
try {
@ -104,6 +104,30 @@ var async = require('async'),
next();
}
},
function (next) {
// Check if the `--ci` flag contained values we can work with
var ciVals;
try {
ciVals = JSON.parse(nconf.get('ci'));
} catch (e) {
ciVals = undefined;
}
if (ciVals && ciVals instanceof Object) {
if (ciVals.hasOwnProperty('host') && ciVals.hasOwnProperty('port') && ciVals.hasOwnProperty('database')) {
install.ciVals = ciVals;
next();
} else {
winston.error('Required values are missing for automated CI integration:');
if (!ciVals.hasOwnProperty('host')) winston.error(' host');
if (!ciVals.hasOwnProperty('port')) winston.error(' port');
if (!ciVals.hasOwnProperty('database')) winston.error(' database');
process.exit();
}
} else {
next();
}
},
function (next) {
var success = function (err, config) {
if (!config) {
@ -165,6 +189,16 @@ var async = require('async'),
});
};
// Add CI object
if (install.ciVals) {
config['test_database'] = {};
for(var prop in install.ciVals) {
if (install.ciVals.hasOwnProperty(prop)) {
config['test_database'][prop] = install.ciVals[prop];
}
}
}
if(config.database === 'redis') {
if (config['redis:host'] && config['redis:port']) {
dbQuestionsSuccess(null, config);

Loading…
Cancel
Save