Comparing version 0.6.5 to 0.6.7
var nodemiral = require('nodemiral'); | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
var rimraf = require('rimraf'); | ||
var exec = require('child_process').exec; | ||
@@ -74,4 +75,6 @@ var spawn = require('child_process').spawn; | ||
var self = this; | ||
var bundlePath = path.resolve(format('/tmp/%s.tar.gz', uuid.v4())); | ||
var command = format("%s bundle %s", this.config.meteorBinary, bundlePath); | ||
var bundleLocation = path.resolve('/tmp', uuid.v4()); | ||
var bundlePath = path.resolve(bundleLocation, 'bundle.tar.gz'); | ||
var command = getBundleCommand(bundleLocation); | ||
var options = {cwd: this.config.app}; | ||
@@ -81,3 +84,3 @@ var deployCheckWaitTime = this.config.deployCheckWaitTime; | ||
console.log('Bundling Started: ' + this.config.app); | ||
console.log('Building Started: ' + this.config.app); | ||
var vars = { | ||
@@ -88,3 +91,3 @@ stdout: "", | ||
}; | ||
var bash = spawn("bash", ["-c", command], options); | ||
@@ -116,3 +119,3 @@ bash.stdout.on('data', storeLastNChars(vars, "stdout", 1000)); | ||
deployCheckWaitTime, appName); | ||
taskList.run(sessionsInfo.sessions); | ||
taskList.run(sessionsInfo.sessions, afterCompleted); | ||
} | ||
@@ -132,4 +135,12 @@ } | ||
function afterCompleted(summeryMap) { | ||
fs.unlinkSync(bundlePath); | ||
rimraf.sync(bundleLocation); | ||
} | ||
function getBundleCommand(location) { | ||
var command = | ||
"meteor build --directory " + location + " && " + | ||
"cd " + location + " && " + | ||
"tar cvzf bundle.tar.gz bundle"; | ||
return command; | ||
} | ||
}; | ||
@@ -197,2 +208,2 @@ | ||
} | ||
}; | ||
}; |
{ | ||
"name": "mup", | ||
"version": "0.6.5", | ||
"version": "0.6.7", | ||
"description": "Production Quality Meteor Deployments", | ||
@@ -9,3 +9,4 @@ "dependencies": { | ||
"uuid": "1.4.x", | ||
"colors": "0.6.x" | ||
"colors": "0.6.x", | ||
"rimraf": "2.x.x" | ||
}, | ||
@@ -12,0 +13,0 @@ "bin": { |
459
38675
5
25
+ Addedrimraf@2.x.x
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedwrappy@1.0.2(transitive)