forked from standardshub/oma-tools-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (32 loc) · 841 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var gulp = require('gulp');
var runSequence = require('run-sequence');
var git = require('gulp-git');
var watch = require('gulp-watch');
var rjs = require('gulp-requirejs');
var sass = require('gulp-sass');
gulp.task('watch', function() {
gulp.watch('**', ['build-profile']);
});
gulp.task('publish', function(callback) {
runSequence('checkout', 'merge', 'push', 'cleanup', callback);
});
gulp.task('checkout', function() {
git.checkout('gh-pages', function (err) {
if (err) throw err;
});
});
gulp.task('merge', function() {
git.merge('master', function(err) {
if (err) throw err;
});
});
gulp.task('push', function() {
git.push('origin', 'gh-pages', function(err) {
if (err) throw err;
});
});
gulp.task('cleanup', function() {
git.checkout('master', function(err) {
if (err) throw err;
});
});