forked from wpscholar-wp-plugins/simple-website-redirect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
40 lines (35 loc) · 1.06 KB
/
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
39
40
let gulp = require('gulp');
let shell = require('gulp-shell');
let del = require('del');
let config = {
svn: {
url: 'http://plugins.svn.wordpress.org/simple-website-redirect/',
src: [
'./**',
'!**/screenshot-*.png',
'!**/screenshot-*.jpg',
'!**/screenshot-*.gif',
'!**/svn',
'!**/svn/**',
'!**/readme.md',
'!**/package.json',
'!**/package-lock.json',
'!**/node_modules',
'!**/node_modules/**',
'!**/bower.json',
'!**/bower_components',
'!**/bower_components/**',
'!**/gulpfile.js',
],
dest: './svn/trunk',
clean: './svn/trunk/**/*'
}
};
gulp.task('svn:checkout', shell.task('svn co ' + config.svn.url + ' svn'));
gulp.task('svn:clean', function () {
return del(config.svn.clean);
});
gulp.task('svn:copy', ['svn:clean'], function () {
return gulp.src(config.svn.src).pipe(gulp.dest(config.svn.dest));
});
gulp.task('svn:stage', ['svn:copy']);