Permalink
Browse files

[api] Implement `predeploy` hook

  • Loading branch information...
1 parent 9df1753 commit b28c13566b4b596f733d6d09f36860d79ce8229c @mmalecki mmalecki committed May 25, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 lib/jitsu/commands/apps.js
@@ -110,12 +110,18 @@ apps.deploy = function (callback) {
return callback(err, true, true);
}
- jitsu.package.updateTarball(null, pkg, existing, firstSnapshot, function (err, snapshot) {
+ jitsu.package.runScript(pkg, 'predeploy', function (err) {
if (err) {
- return callback(err, snapshot);
+ return callback(err);
}
-
- updateApp(existing, snapshot);
+
+ jitsu.package.updateTarball(null, pkg, existing, firstSnapshot, function (err, snapshot) {
+ if (err) {
+ return callback(err, snapshot);
+ }
+
+ updateApp(existing, snapshot);
+ });
});
}

0 comments on commit b28c135

Please sign in to comment.