-
Notifications
You must be signed in to change notification settings - Fork 8
/
gulpfile.js
45 lines (36 loc) · 1.27 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
let gulp = require('gulp');
let { clean, restore, build, test, pack, publish, run } = require('../dist/index');
let path = require('path');
let process = require('process');
gulp.task('clean', () => {
return gulp.src('**/*.csproj', { read: false })
.pipe(clean());
});
gulp.task('restore', ['clean'], () => {
return gulp.src('**/*.csproj', { read: false })
.pipe(restore({ echo: true }));
});
gulp.task('build', ['restore'], () => {
return gulp.src('**/*.csproj', { read: false })
.pipe(build({ configuration: 'Release', version: '1.3.0', echo: true }));
});
gulp.task('test', ['build'], () => {
return gulp.src('tst/*.csproj', { read: false })
.pipe(test({ echo: true }));
});
gulp.task('publish', ['test'], () => {
return gulp.src('**/*.csproj', { read: false })
.pipe(publish());
});
gulp.task('pack', ['build'], () => {
return gulp.src('**/*.csproj', { read: false })
.pipe(pack({ output: path.join(process.cwd(), 'nupkgs'), echo: true, noRestore: true }));
});
gulp.task('run', [], () => {
return gulp.src('args/*.csproj', { read: false })
.pipe(run({
additionalArgs: ['Steve'],
echo: true
}));
});
gulp.task('preflight', ['restore', 'build', 'test', 'publish', 'pack']);