boom-deploy
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -38,6 +38,7 @@ | ||
__web(function(){ | ||
var data = ssh('cd {{currentPath}} && cat ./BRANCH ./REVISION').split(/\s/); | ||
var data = ssh('cd {{currentPath}} && cat ./BRANCH ./REVISION ./RELEASE').split(/\s/); | ||
return { | ||
branch : data[0], | ||
commit : data[1] | ||
branch : data[0], | ||
commit : data[1], | ||
release : data[2] | ||
} | ||
@@ -44,0 +45,0 @@ }) |
@@ -19,3 +19,15 @@ var _ = require('lodash'); | ||
if (!config.hasDir(config.userdir)) fs.mkdirSync(config.userdir); | ||
exports.isInitialized = function(){ | ||
if (!config.isPrepared()) { | ||
console.error('Not initialized. Use "boom init".'); | ||
process.exit(1); | ||
} | ||
} | ||
exports.list = function(){ | ||
exports.isInitialized(); | ||
config.init(function(err){ | ||
@@ -38,2 +50,18 @@ if (err) return exports.error(err); | ||
exports.go = function(env, taskname, args){ | ||
exports.isInitialized(); | ||
config.init(env, function(err){ | ||
if (err) return exports.error(err); | ||
helpers.init(); | ||
exports.prepare(function(){ | ||
exports.perform(taskname, args); | ||
}); | ||
}); | ||
}; | ||
exports.prepare = function(callback){ | ||
@@ -65,16 +93,2 @@ github.login(function(err){ | ||
exports.go = function(env, taskname, args){ | ||
config.init(env, function(err){ | ||
if (err) return exports.error(err); | ||
helpers.init(); | ||
exports.prepare(function(){ | ||
exports.perform(taskname, args); | ||
}); | ||
}); | ||
}; | ||
exports.perform = function(taskname, args){ | ||
@@ -81,0 +95,0 @@ |
@@ -32,6 +32,2 @@ var _ = require('lodash'); | ||
if (!config.isPrepared()) { | ||
return callback(new Error('Not initialized. Use "boom init".')); | ||
} | ||
async.parallel({ | ||
@@ -77,3 +73,6 @@ main : config.loadConfig.bind(config, config.main), | ||
fs.readFile(path.resolve(self.dir, name + self.ext), function(err, filestring){ | ||
if (err) return callback(new Error('has no config file boom/%s.', name + self.ext)); | ||
if (err) { | ||
console.error(err); | ||
return callback(new Error('has no config file boom/' + (name + self.ext) + '.')); | ||
} | ||
var data; | ||
@@ -83,3 +82,4 @@ try { | ||
} catch(err) { | ||
return callback(new Error('cannot parse config file boom/%s:', name + self.ext, err)); | ||
console.error(err); | ||
return callback(new Error('cannot parse config file boom/' + (name + self.ext) + '.')); | ||
} | ||
@@ -99,5 +99,2 @@ callback(null, data); | ||
} | ||
}; | ||
if (!config.hasDir(config.userdir)) fs.mkdirSync(config.userdir); | ||
}; |
@@ -28,3 +28,3 @@ var _ = require('lodash'); | ||
var err = new Error('has no dir "boom" in branch "' + config.get('branch') + '".'); | ||
err.exit = true; | ||
// err.exit = true; | ||
return callback(err); | ||
@@ -36,3 +36,3 @@ } | ||
var err = new Error('has no taskfiles in branch "' + config.get('branch') + '".'); | ||
err.exit = true; | ||
// err.exit = true; | ||
return callback(err); | ||
@@ -39,0 +39,0 @@ } |
{ | ||
"name": "boom-deploy", | ||
"main": "boom.js", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "deploy your app", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45614
1325