Permalink
Browse files

fix tapkick example to deploy specific revision

  • Loading branch information...
1 parent bec41ed commit 8ad368a3df81f84063d1c4f909c53bbf8b116c9a Russell Haering committed Jan 7, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 example/stacks/tapkick.js
View
@@ -17,15 +17,17 @@ exports.get_deployedRevision = function(args, callback) {
exports.task_deploy = function(stack, baton, args, callback) {
- var cmd = ['git', 'pull', 'origin', 'master'],
- opts = {cwd: stack.config.tapkick_dir, env: process.env};
+ var opts = {cwd: stack.config.tapkick_dir, env: process.env};
- misc.taskSpawn(baton, args, cmd, opts, function(err, stdout, stderr) {
- if (!err) {
- baton.log.info('ran git pull');
+ async.series([
+ function fetch(callback) {
+ misc.taskSpawn(baton, args, ['git', 'fetch'], opts, callback);
+ },
+
+ function checkout(callback) {
+ misc.taskSpawn(baton, args, ['git', 'checkout', args.revision], opts, callback);
}
- callback(err);
- });
+ ], callback);
};
exports.targets = {

0 comments on commit 8ad368a

Please sign in to comment.