forked from aws/aws-toolkit-azure-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
52 lines (43 loc) · 1.24 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
41
42
43
44
45
46
47
48
49
50
51
52
var gulp = require('gulp');
var gutil = require('gulp-util');
var child_process = require('child_process');
var process = require('process');
function make (target, cb) {
var cl = ('node make.js ' + target + ' ' + process.argv.slice(3).join(' ')).trim();
console.log('------------------------------------------------------------');
console.log('> ' + cl);
console.log('------------------------------------------------------------');
try {
child_process.execSync(cl, { cwd: __dirname, stdio: 'inherit' });
}
catch (err) {
var msg = err.output ? err.output.toString() : err.message;
console.error(msg);
cb(new gutil.PluginError(msg));
return false;
}
return true;
}
gulp.task('build', function (cb) {
make('build', cb);
});
gulp.task('default', ['build']);
gulp.task('clean', function (cb) {
make('clean', cb);
});
gulp.task('test', function (cb) {
make('build', cb) &&
make('test', cb);
});
gulp.task('updateversion', function(cb) {
make('updateversion', cb);
});
gulp.task('package', function (cb) {
make('clean', cb) &&
make('build', cb) &&
make('test', cb) &&
make('package', cb);
});
gulp.task('publish', function (cb) {
make('publish', cb);
})