forked from aws/aws-toolkit-azure-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
62 lines (52 loc) · 1.43 KB
/
Copy pathgulpfile.js
File metadata and controls
62 lines (52 loc) · 1.43 KB
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
53
54
55
56
57
58
59
60
61
62
var gulp = require('gulp');
var child_process = require('child_process');
var process = require('process');
function make (target, done) {
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);
done(new Error(msg));
return false;
}
return true;
}
gulp.task('build', gulp.series(function (done) {
make('build', done);
done();
}));
gulp.task('default', gulp.series('build'));
gulp.task('clean', function (done) {
make('clean', done);
done();
});
gulp.task('test', function (done) {
make('build', done) &&
make('test', done);
done();
});
gulp.task('updateversioninfo', function(done) {
make('updateversioninfo', done);
done();
});
gulp.task('updateregioninfo', function(done) {
make('updateregioninfo', done);
done();
});
gulp.task('package', function (done) {
make('clean', done) &&
make('build', done) &&
make('test', done) &&
make('package', done);
done();
});
gulp.task('publish', function (done) {
make('publish', done);
done();
})