boom-deploy
Advanced tools
Comparing version 0.0.27 to 0.0.28
@@ -56,2 +56,3 @@ | ||
//sudoSetPassword(); | ||
sudo('service nginx reload'); | ||
@@ -61,2 +62,4 @@ sudo('service php5-fpm reload'); | ||
sudo('service memcached restart'); | ||
//exit('ololo'); | ||
}) | ||
@@ -63,0 +66,0 @@ |
@@ -69,4 +69,10 @@ var _ = require('lodash'); | ||
// console.log(scope); | ||
if (err) return console.error($('FAIL.').bold.red + ' ' + err); | ||
console.log($('SUCCESS.').bold.green); | ||
if (err && err.exit) console.log($('EXIT:').bold.cyan, err.message); | ||
else if (err) return console.error($('FAIL.').bold.red + ' ' + err); | ||
else console.log($('SUCCESS.').bold.green); | ||
if (config.sudoStored) { | ||
spawnProcess.ssh('rm -f ' + config.sudoPath, function(){ | ||
// | ||
}) | ||
} | ||
}); | ||
@@ -73,0 +79,0 @@ }; |
@@ -13,2 +13,5 @@ var _ = require('lodash'); | ||
sudoStored: false, | ||
sudoPath: '~/.sudo_pass', | ||
dir : path.resolve(process.cwd(), './boom'), | ||
@@ -15,0 +18,0 @@ userdir : path.resolve(process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'], '.boom'), |
@@ -14,6 +14,2 @@ var _ = require('lodash'); | ||
var tmp = { | ||
sudoStored: false | ||
} | ||
var scope = { | ||
@@ -63,3 +59,3 @@ console: console, | ||
logger.info($('Executing: sudo on ' + $(config.get('server')).blue).bold + '\n' + $(cmd).yellow); | ||
spawnProcess.ssh('cat ~/.sudo_pass | sudo -S ' + cmd, function (err, out) { | ||
spawnProcess.ssh('cat ' + config.sudoPath + ' | sudo -S ' + cmd, function (err, out) { | ||
if (err) future.throw(err); | ||
@@ -71,5 +67,5 @@ else future.return(out); | ||
function store(cb){ | ||
if (!tmp.sudoStored) { | ||
tmp.sudoStored = true; | ||
spawnProcess.ssh('echo ' + config.get('sudo') + ' > ~/.sudo_pass && chmod a+x ~/.sudo_pass', function(err, out){ | ||
if (!config.sudoStored) { | ||
config.sudoStored = true; | ||
spawnProcess.ssh('echo ' + config.get('sudo') + ' > ' + config.sudoPath + ' && chmod a+x ' + config.sudoPath, function(err, out){ | ||
if (err) return future.throw(err); | ||
@@ -118,4 +114,5 @@ cb(); | ||
exit: function(msg){ | ||
console.log($('EXIT:').bold.cyan, msg) | ||
process.exit(); | ||
var err = new Error(msg); | ||
err.exit = true; | ||
throw err; | ||
}, | ||
@@ -122,0 +119,0 @@ sleep: function(ms){ |
{ | ||
"name": "boom-deploy", | ||
"main": "boom.js", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"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
33444
1047