mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
changing minimum required version for NodeBB to 0.10, and updated travis config. Allowing new setup option "ci", for TravisCI integration
This commit is contained in:
@@ -7,4 +7,3 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- "0.11"
|
- "0.11"
|
||||||
- "0.10"
|
- "0.10"
|
||||||
- "0.8"
|
|
||||||
@@ -33,7 +33,7 @@ Credit: [Convoe](http://www.convoe.com), [Kano](http://www.kano.me), [Manchester
|
|||||||
|
|
||||||
NodeBB requires the following software to be installed:
|
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
|
* 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)
|
* 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) {
|
setup: function (callback) {
|
||||||
async.series([
|
async.series([
|
||||||
function(next) {
|
function (next) {
|
||||||
// Check if the `--setup` flag contained values we can work with
|
// Check if the `--setup` flag contained values we can work with
|
||||||
var setupVal;
|
var setupVal;
|
||||||
try {
|
try {
|
||||||
@@ -104,6 +104,30 @@ var async = require('async'),
|
|||||||
next();
|
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) {
|
function (next) {
|
||||||
var success = function (err, config) {
|
var success = function (err, config) {
|
||||||
if (!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.database === 'redis') {
|
||||||
if (config['redis:host'] && config['redis:port']) {
|
if (config['redis:host'] && config['redis:port']) {
|
||||||
dbQuestionsSuccess(null, config);
|
dbQuestionsSuccess(null, config);
|
||||||
|
|||||||
Reference in New Issue
Block a user