Skip to content

Commit

Permalink
Updated script to only commit doc changes if there are changes to be …
Browse files Browse the repository at this point in the history
…committed
  • Loading branch information
notheotherben committed Aug 30, 2015
1 parent 711c490 commit 3dcd9c8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build/doc.js
Expand Up @@ -16,17 +16,20 @@ gulp.task('doc-submodule', function(cb) {
});

gulp.task('doc-commit', function(cb) {
runSequence('doc-commit-changes', 'doc-commit-newdocs', cb);
git.exec({ args: 'diff-files', quiet: true, cwd: 'doc' }, function(err, stdout) {
if(err && err.code === 1) runSequence('doc-commit-changes', 'doc-commit-newdocs', cb);
else cb();
});
});

gulp.task('doc-commit-changes', function() {
return gulp.src('doc')
.pipe(git.commit('Updated documentation'));
return gulp.src('.', { cwd: 'doc' })
.pipe(git.commit('Updated documentation', { options: '--quiet', cwd: 'doc', quiet: true }));
});

gulp.task('doc-commit-newdocs', function() {
return gulp.src('.')
.pipe(git.commit('Updated documentation'));
.pipe(git.commit('Updated documentation', { options: '--quiet', quiet: true }));
});

gulp.task('doc-push', function(cb) {
Expand Down

0 comments on commit 3dcd9c8

Please sign in to comment.