Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
only start build server if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
zaach committed Dec 18, 2012
1 parent 1b7aa4c commit ffaa748
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions bin/builder
Expand Up @@ -14,6 +14,10 @@ const spawn = require('child_process').spawn;


console.log("build server starting up"); console.log("build server starting up");


if (!config.build_server.enabled) {
console.log("builds disabled");
}

var buildScript = path.resolve(__dirname, '..', 'scripts', 'crxmake.sh'); var buildScript = path.resolve(__dirname, '..', 'scripts', 'crxmake.sh');
var downloadDir = path.join(__dirname, '..', 'downloads'); var downloadDir = path.join(__dirname, '..', 'downloads');
var privSigningKeyPath = path.join(process.env['HOME'], '.ssh', 'id_rsa'); var privSigningKeyPath = path.join(process.env['HOME'], '.ssh', 'id_rsa');
Expand Down Expand Up @@ -179,6 +183,8 @@ Builder.prototype._pullLatest = function(cb) {
// may be invoked any time we suspect updates have occured to re-deploy // may be invoked any time we suspect updates have occured to re-deploy
// if needed // if needed
Builder.prototype.checkForUpdates = function() { Builder.prototype.checkForUpdates = function() {
if (!config.build_server.enabled) return;

var self = this; var self = this;


if (this._busy) { if (this._busy) {
Expand Down
3 changes: 3 additions & 0 deletions etc/config.js
Expand Up @@ -30,6 +30,9 @@ var config = module.exports = {
scheme: 'hawk' scheme: 'hawk'
} }
}, },
build_server: {
enabled: process.env.ENABLE_BUILDS || false
},
env: process.env.NODE_ENV || 'development', env: process.env.NODE_ENV || 'development',
db: { db: {
store: process.env.DB_STORE || 'json', store: process.env.DB_STORE || 'json',
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_locally.js
Expand Up @@ -18,7 +18,7 @@ var daemonsToRun = {
}; };


// only run builder if specified // only run builder if specified
//if (!process.env.BUILD_SERVER) delete daemonsToRun.builder; if (!process.env.ENABLE_BUILDS) delete daemonsToRun.builder;


process.env['GOMBOT_HOST'] = HOST; process.env['GOMBOT_HOST'] = HOST;


Expand Down

0 comments on commit ffaa748

Please sign in to comment.