Skip to content

Commit

Permalink
[api] Implement predeploy hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Jun 20, 2012
1 parent 9df1753 commit b28c135
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/jitsu/commands/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
}

Expand Down

0 comments on commit b28c135

Please sign in to comment.