Last active
August 29, 2015 14:27
-
-
Save jkarsrud/4c02e156d99978917563 to your computer and use it in GitHub Desktop.
shipit from grunt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exec = require('child_process').exec; | |
grunt.registerTask('deploy', 'Deploy to stage!', function(target) { | |
var done = this.async(); | |
grunt.task.run(['foo', 'bar']); | |
// Requires globally installed shipit-cli | |
var cmd = 'shipit stage ' + target; | |
exec(cmd, function(err, stdout, stdin) { | |
if(err) { | |
console.error(err.message); | |
} | |
console.log(stdout) | |
done(); | |
}); | |
}); | |
// Call it like so: | |
// grunt deploy:stage | |
// grunt deploy:production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment