UNPKG

706 BJavaScriptView Raw
1
2(function () {
3 var gulp = require('gulp');
4 var exec = require('child_process').exec;
5 var path = require('path');
6 var configFile = require(path.join(process.cwd(), '.config.book.json'));;
7
8 gulp.task('deploy-heroku', [], function() {
9 exec('git add .', (err, out) => {
10 if (err) console.log(err);
11 console.log(out);
12 exec('git commit -m \"Updating book for heroku at ' + new Date() + '\"', function (err, out) {
13 console.log(out);
14 exec('git push heroku master', function(err,out) {
15 console.log(out);
16 console.log("Now you can see your document at " + configFile['heroku_url']);
17 })
18 });
19 });
20 });
21})(this);