zarro 1.98.0 → 1.99.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/gulp-tasks/build.js +135 -135
  2. package/gulp-tasks/clean.js +37 -37
  3. package/gulp-tasks/cover-dotnet.js +56 -56
  4. package/gulp-tasks/dotnet-publish.js +24 -24
  5. package/gulp-tasks/git-submodules.js +83 -83
  6. package/gulp-tasks/modules/ask.ts +41 -41
  7. package/gulp-tasks/modules/download-nuget.js +104 -104
  8. package/gulp-tasks/modules/ensure-folder-exists.js +28 -28
  9. package/gulp-tasks/modules/env-helpers.ts +67 -67
  10. package/gulp-tasks/modules/env.js +364 -364
  11. package/gulp-tasks/modules/fail-after.ts +34 -34
  12. package/gulp-tasks/modules/find-npm-base.js +42 -42
  13. package/gulp-tasks/modules/fs.js +79 -79
  14. package/gulp-tasks/modules/git-push-tags.js +2 -2
  15. package/gulp-tasks/modules/git-push-tags.ts +42 -42
  16. package/gulp-tasks/modules/git-push.js +53 -51
  17. package/gulp-tasks/modules/git-tag.js +36 -36
  18. package/gulp-tasks/modules/gulp-dotnetcover.js +537 -537
  19. package/gulp-tasks/modules/gulp-git-tag-from-csproj.ts +71 -71
  20. package/gulp-tasks/modules/gulp-git-tag-from-package-nuspec.js +55 -55
  21. package/gulp-tasks/modules/gulp-increment-nuget-package-version.ts +122 -122
  22. package/gulp-tasks/modules/gulp-msbuild.js +1 -1
  23. package/gulp-tasks/modules/gulp-npm-run.ts +52 -52
  24. package/gulp-tasks/modules/gulp-nuget-pack.js +168 -168
  25. package/gulp-tasks/modules/gulp-nuget-restore.js +106 -106
  26. package/gulp-tasks/modules/gulp-nunit-runner/.jshintrc +6 -6
  27. package/gulp-tasks/modules/gulp-nunit-runner/README.md +300 -300
  28. package/gulp-tasks/modules/gulp-nunit-runner/index.js +1 -1
  29. package/gulp-tasks/modules/gulp-nunit-runner/lib/index.js +205 -205
  30. package/gulp-tasks/modules/gulp-nunit-runner/lib/teamcity.js +86 -86
  31. package/gulp-tasks/modules/gulp-purge.js +88 -88
  32. package/gulp-tasks/modules/gulp.js +92 -92
  33. package/gulp-tasks/modules/http-downloader.js +113 -113
  34. package/gulp-tasks/modules/import-npm-tasks.js +33 -33
  35. package/gulp-tasks/modules/increment-version-string.js +18 -18
  36. package/gulp-tasks/modules/increment-version.ts +41 -41
  37. package/gulp-tasks/modules/install-local-tools.js +122 -122
  38. package/gulp-tasks/modules/load-xml-file.ts +15 -15
  39. package/gulp-tasks/modules/log-config.js +31 -31
  40. package/gulp-tasks/modules/nuget-push.ts +72 -72
  41. package/gulp-tasks/modules/nuget-update-self.js +9 -9
  42. package/gulp-tasks/modules/nuget.ts +14 -14
  43. package/gulp-tasks/modules/pad.js +25 -25
  44. package/gulp-tasks/modules/parse-xml-string.ts +6 -6
  45. package/gulp-tasks/modules/promisify-function.ts +18 -18
  46. package/gulp-tasks/modules/promisify-stream.js +73 -73
  47. package/gulp-tasks/modules/read-all-git-branches.js +2 -2
  48. package/gulp-tasks/modules/read-all-git-branches.ts +13 -13
  49. package/gulp-tasks/modules/read-all-git-remotes.js +2 -2
  50. package/gulp-tasks/modules/read-all-git-remotes.ts +44 -44
  51. package/gulp-tasks/modules/read-csproj-package-version.ts +26 -26
  52. package/gulp-tasks/modules/read-csproj-version.ts +26 -26
  53. package/gulp-tasks/modules/read-current-git-branch.js +2 -2
  54. package/gulp-tasks/modules/read-current-git-branch.ts +16 -16
  55. package/gulp-tasks/modules/read-git-commit-delta-count.ts +33 -33
  56. package/gulp-tasks/modules/read-git-info.ts +31 -31
  57. package/gulp-tasks/modules/read-git-remote.js +2 -2
  58. package/gulp-tasks/modules/read-git-remote.ts +23 -23
  59. package/gulp-tasks/modules/read-last-fetch-time.ts +17 -17
  60. package/gulp-tasks/modules/read-main-branch-name.js +2 -2
  61. package/gulp-tasks/modules/read-main-branch-name.ts +75 -76
  62. package/gulp-tasks/modules/read-nuspec-version.ts +22 -22
  63. package/gulp-tasks/modules/read-package-json.ts +22 -22
  64. package/gulp-tasks/modules/register-environment-variables.js +526 -526
  65. package/gulp-tasks/modules/resolve-git-branch.ts +13 -13
  66. package/gulp-tasks/modules/resolve-git-remote.ts +13 -13
  67. package/gulp-tasks/modules/resolve-nuget.js +135 -135
  68. package/gulp-tasks/modules/rewrite-file.ts +34 -34
  69. package/gulp-tasks/modules/run-sequence.js +16 -16
  70. package/gulp-tasks/modules/safe-git.ts +23 -23
  71. package/gulp-tasks/modules/testutil-finder.js +176 -176
  72. package/gulp-tasks/modules/uniq.ts +5 -5
  73. package/gulp-tasks/modules/version-reading-shared.ts +16 -16
  74. package/gulp-tasks/modules/zarro-error.js +6 -6
  75. package/gulp-tasks/nuget-restore.js +57 -57
  76. package/gulp-tasks/release-npm.js +2 -2
  77. package/gulp-tasks/release-npm.ts +2 -2
  78. package/gulp-tasks/start/_package.json +39 -39
  79. package/gulp-tasks/start/gulpfile.js +204 -204
  80. package/gulp-tasks/start/update-starter-packages.js +63 -63
  81. package/gulp-tasks/test-dotnet.js +196 -195
  82. package/gulp-tasks/update-git-submodules.js +2 -2
  83. package/gulp-tasks/update-git-submodules.ts +2 -2
  84. package/gulp-tasks/update-self.js +4 -4
  85. package/gulp-tasks/update-self.ts +88 -88
  86. package/gulp-tasks/verify-up-to-date.js +5 -5
  87. package/gulp-tasks/verify-up-to-date.ts +119 -119
  88. package/index-modules/contains-any.js +31 -31
  89. package/index-modules/handlers/show-env.js +46 -46
  90. package/package.json +1 -2
  91. package/tsconfig.json +66 -66
  92. package/types.d.ts +757 -757
@@ -1,135 +1,135 @@
1
- const
2
- chalk = require("ansi-colors"),
3
- os = require("os"),
4
- env = requireModule("env"),
5
- gulp = requireModule("gulp"),
6
- debug = require("debug")("build"),
7
- promisifyStream = requireModule("promisify"),
8
- dotnetCli = require("gulp-dotnet-cli"),
9
- dotnetClean = dotnetCli.clean,
10
- dotnetBuild = dotnetCli.build,
11
- throwIfNoFiles = requireModule("throw-if-no-files"),
12
- xbuild = requireModule("gulp-xbuild"),
13
- gutil = requireModule("gulp-util"),
14
- log = requireModule("log"),
15
- resolveMasks = requireModule("resolve-masks"),
16
- logConfig = requireModule("log-config"),
17
- msbuild = require("gulp-msbuild");
18
-
19
- gulp.task("prebuild", ["nuget-restore"]);
20
-
21
- const myTasks = ["build"],
22
- myVars = [
23
- "BUILD_CONFIGURATION",
24
- "BUILD_PLATFORM",
25
- "BUILD_ARCHITECTURE",
26
- "BUILD_TARGETS",
27
- "BUILD_TOOLSVERSION",
28
- "BUILD_VERBOSITY",
29
- "BUILD_MSBUILD_NODE_REUSE",
30
- "BUILD_MAX_CPU_COUNT",
31
- "MAX_CONCURRENCY",
32
- "BUILD_INCLUDE",
33
- "BUILD_EXCLUDE",
34
- "BUILD_ADDITIONAL_EXCLUDE",
35
- "BUILD_SHOW_INFO",
36
- "BUILD_FAIL_ON_ERROR"
37
- ];
38
- env.associate(myVars, myTasks);
39
-
40
- gulp.task(
41
- "build",
42
- "Builds Visual Studio solutions in tree",
43
- ["prebuild"],
44
- build
45
- );
46
-
47
- gulp.task("quick-build", "Quick build without pre-cursors", build);
48
-
49
- async function build() {
50
- const slnMasks = resolveMasks("BUILD_INCLUDE", [ "BUILD_EXCLUDE", "BUILD_ADDITIONAL_EXCLUDE"]);
51
- debug({
52
- slnMasks,
53
- cwd: process.cwd()
54
- });
55
- const solutions = gulp
56
- .src(slnMasks, { allowEmpty: true })
57
- .pipe(throwIfNoFiles(`No solutions found matching masks: ${slnMasks}}`));
58
-
59
- // TODO: find a reliable, quick way to determine if the projects to be compiled
60
- // are all dotnet core -- trawling *.csproj is slow and has caused hangups
61
- // here, so for now, DNC build must be requested via env DONET_CORE
62
- return env.resolveFlag("DOTNET_CORE")
63
- ? buildForNetCore(solutions)
64
- : buildForNETFramework(solutions);
65
- }
66
-
67
- function buildForNetCore(solutions) {
68
- log.info(gutil.colors.yellow("Building with dotnet core"));
69
- const
70
- configuration = env.resolve("BUILD_CONFIGURATION"),
71
- msbuildArgs = [];
72
- if (!env.resolveFlag("BUILD_MSBUILD_NODE_REUSE")) {
73
- msbuildArgs.push("/nodeReuse:false")
74
- }
75
- return promisifyStream(
76
- solutions
77
- .pipe(
78
- dotnetClean({
79
- configuration
80
- })
81
- )
82
- .pipe(
83
- dotnetBuild({
84
- verbosity: env.resolve("BUILD_VERBOSITY"),
85
- configuration,
86
- // msbuild attempts to re-use nodes, which causes issues
87
- // if you're building unrelated projects on the same machine with,
88
- // eg, different versions of Microsoft.Net.Compilers
89
- msbuildArgs,
90
- echo: true
91
- })
92
- )
93
- );
94
- }
95
-
96
- function buildForNETFramework(solutions) {
97
- log.info(chalk.yellowBright("Building with MsBuild"));
98
- return promisifyStream(buildAsStream(solutions));
99
- }
100
-
101
- function buildAsStream(solutions) {
102
- const builder = os.platform() === "win32" ? msbuild : xbuild;
103
- const config = {
104
- toolsVersion: env.resolve("BUILD_TOOLSVERSION"),
105
- targets: env.resolveArray("BUILD_TARGETS"),
106
- configuration: env.resolve("BUILD_CONFIGURATION"),
107
- stdout: true,
108
- verbosity: env.resolve("BUILD_VERBOSITY"),
109
- errorOnFail: env.resolveFlag("BUILD_FAIL_ON_ERROR"),
110
- solutionPlatform: env.resolve("BUILD_PLATFORM"),
111
- // NB: this is the MSBUILD architecture, NOT your desired output architecture
112
- architecture: env.resolve("BUILD_ARCHITECTURE"),
113
- nologo: false,
114
- logCommand: true,
115
- nodeReuse: env.resolveFlag("BUILD_MSBUILD_NODE_REUSE"),
116
- maxcpucount: env.resolveNumber("BUILD_MAX_CPU_COUNT")
117
- };
118
-
119
- if (env.resolveFlag("BUILD_SHOW_INFO")) {
120
- logConfig(config, {
121
- toolsVersion: "Tools version",
122
- targets: "Build targets",
123
- configuration: "Build configuration",
124
- stdout: "Log to stdout",
125
- verbosity: "Build verbosity",
126
- errorOnFail: "Any error fails the build",
127
- solutionPlatform: "Build platform",
128
- architecture: "Build architecture",
129
- nodeReuse: "Re-use MSBUILD nodes",
130
- maxcpucount: "Max CPUs to use for build",
131
- });
132
- }
133
- return solutions
134
- .pipe(builder(config));
135
- }
1
+ const
2
+ chalk = require("ansi-colors"),
3
+ os = require("os"),
4
+ env = requireModule("env"),
5
+ gulp = requireModule("gulp"),
6
+ debug = require("debug")("build"),
7
+ promisifyStream = requireModule("promisify"),
8
+ dotnetCli = require("gulp-dotnet-cli"),
9
+ dotnetClean = dotnetCli.clean,
10
+ dotnetBuild = dotnetCli.build,
11
+ throwIfNoFiles = requireModule("throw-if-no-files"),
12
+ xbuild = requireModule("gulp-xbuild"),
13
+ gutil = requireModule("gulp-util"),
14
+ log = requireModule("log"),
15
+ resolveMasks = requireModule("resolve-masks"),
16
+ logConfig = requireModule("log-config"),
17
+ msbuild = require("gulp-msbuild");
18
+
19
+ gulp.task("prebuild", ["nuget-restore"]);
20
+
21
+ const myTasks = ["build"],
22
+ myVars = [
23
+ "BUILD_CONFIGURATION",
24
+ "BUILD_PLATFORM",
25
+ "BUILD_ARCHITECTURE",
26
+ "BUILD_TARGETS",
27
+ "BUILD_TOOLSVERSION",
28
+ "BUILD_VERBOSITY",
29
+ "BUILD_MSBUILD_NODE_REUSE",
30
+ "BUILD_MAX_CPU_COUNT",
31
+ "MAX_CONCURRENCY",
32
+ "BUILD_INCLUDE",
33
+ "BUILD_EXCLUDE",
34
+ "BUILD_ADDITIONAL_EXCLUDE",
35
+ "BUILD_SHOW_INFO",
36
+ "BUILD_FAIL_ON_ERROR"
37
+ ];
38
+ env.associate(myVars, myTasks);
39
+
40
+ gulp.task(
41
+ "build",
42
+ "Builds Visual Studio solutions in tree",
43
+ ["prebuild"],
44
+ build
45
+ );
46
+
47
+ gulp.task("quick-build", "Quick build without pre-cursors", build);
48
+
49
+ async function build() {
50
+ const slnMasks = resolveMasks("BUILD_INCLUDE", [ "BUILD_EXCLUDE", "BUILD_ADDITIONAL_EXCLUDE"]);
51
+ debug({
52
+ slnMasks,
53
+ cwd: process.cwd()
54
+ });
55
+ const solutions = gulp
56
+ .src(slnMasks, { allowEmpty: true })
57
+ .pipe(throwIfNoFiles(`No solutions found matching masks: ${slnMasks}}`));
58
+
59
+ // TODO: find a reliable, quick way to determine if the projects to be compiled
60
+ // are all dotnet core -- trawling *.csproj is slow and has caused hangups
61
+ // here, so for now, DNC build must be requested via env DONET_CORE
62
+ return env.resolveFlag("DOTNET_CORE")
63
+ ? buildForNetCore(solutions)
64
+ : buildForNETFramework(solutions);
65
+ }
66
+
67
+ function buildForNetCore(solutions) {
68
+ log.info(gutil.colors.yellow("Building with dotnet core"));
69
+ const
70
+ configuration = env.resolve("BUILD_CONFIGURATION"),
71
+ msbuildArgs = [];
72
+ if (!env.resolveFlag("BUILD_MSBUILD_NODE_REUSE")) {
73
+ msbuildArgs.push("/nodeReuse:false")
74
+ }
75
+ return promisifyStream(
76
+ solutions
77
+ .pipe(
78
+ dotnetClean({
79
+ configuration
80
+ })
81
+ )
82
+ .pipe(
83
+ dotnetBuild({
84
+ verbosity: env.resolve("BUILD_VERBOSITY"),
85
+ configuration,
86
+ // msbuild attempts to re-use nodes, which causes issues
87
+ // if you're building unrelated projects on the same machine with,
88
+ // eg, different versions of Microsoft.Net.Compilers
89
+ msbuildArgs,
90
+ echo: true
91
+ })
92
+ )
93
+ );
94
+ }
95
+
96
+ function buildForNETFramework(solutions) {
97
+ log.info(chalk.yellowBright("Building with MsBuild"));
98
+ return promisifyStream(buildAsStream(solutions));
99
+ }
100
+
101
+ function buildAsStream(solutions) {
102
+ const builder = os.platform() === "win32" ? msbuild : xbuild;
103
+ const config = {
104
+ toolsVersion: env.resolve("BUILD_TOOLSVERSION"),
105
+ targets: env.resolveArray("BUILD_TARGETS"),
106
+ configuration: env.resolve("BUILD_CONFIGURATION"),
107
+ stdout: true,
108
+ verbosity: env.resolve("BUILD_VERBOSITY"),
109
+ errorOnFail: env.resolveFlag("BUILD_FAIL_ON_ERROR"),
110
+ solutionPlatform: env.resolve("BUILD_PLATFORM"),
111
+ // NB: this is the MSBUILD architecture, NOT your desired output architecture
112
+ architecture: env.resolve("BUILD_ARCHITECTURE"),
113
+ nologo: false,
114
+ logCommand: true,
115
+ nodeReuse: env.resolveFlag("BUILD_MSBUILD_NODE_REUSE"),
116
+ maxcpucount: env.resolveNumber("BUILD_MAX_CPU_COUNT")
117
+ };
118
+
119
+ if (env.resolveFlag("BUILD_SHOW_INFO")) {
120
+ logConfig(config, {
121
+ toolsVersion: "Tools version",
122
+ targets: "Build targets",
123
+ configuration: "Build configuration",
124
+ stdout: "Log to stdout",
125
+ verbosity: "Build verbosity",
126
+ errorOnFail: "Any error fails the build",
127
+ solutionPlatform: "Build platform",
128
+ architecture: "Build architecture",
129
+ nodeReuse: "Re-use MSBUILD nodes",
130
+ maxcpucount: "Max CPUs to use for build",
131
+ });
132
+ }
133
+ return solutions
134
+ .pipe(builder(config));
135
+ }
@@ -1,37 +1,37 @@
1
- const gulp = requireModule("gulp"),
2
- msbuild = require("gulp-msbuild"),
3
- env = requireModule("env");
4
-
5
- const myVars = [
6
- "BUILD_TOOLSVERSION",
7
- "BUILD_CONFIGURATION",
8
- "BUILD_VERBOSITY",
9
- "BUILD_MAX_CPU_COUNT",
10
- "BUILD_FAIL_ON_ERROR",
11
- "BUILD_PLATFORM",
12
- "BUILD_ARCHITECTURE",
13
- "BUILD_MSBUILD_NODE_REUSE"
14
- ];
15
- env.associate(myVars, "clean");
16
-
17
- gulp.task(
18
- "clean",
19
- "Invokes the 'Clean' target on all solutions in the tree",
20
- function() {
21
- return gulp.src("**/*.sln").pipe(
22
- msbuild({
23
- toolsVersion: env.resolve("BUILD_TOOLSVERSION"),
24
- targets: ["Clean"],
25
- configuration: env.resolve("BUILD_CONFIGURATION"),
26
- stdout: true,
27
- logCommand: true,
28
- errorOnFail: env.resolveFlag("BUILD_FAIL_ON_ERROR"),
29
- solutionPlatform: env.resolve("BUILD_PLATFORM"),
30
- architecture: env.resolve("BUILD_ARCHITECTURE"),
31
- verbosity: env.resolve("BUILD_VERBOSITY"),
32
- nodeReuse: env.resolveFlag("BUILD_MSBUILD_NODE_REUSE"),
33
- maxcpucount: env.resolveNumber("BUILD_MAX_CPU_COUNT")
34
- })
35
- );
36
- }
37
- );
1
+ const gulp = requireModule("gulp"),
2
+ msbuild = require("gulp-msbuild"),
3
+ env = requireModule("env");
4
+
5
+ const myVars = [
6
+ "BUILD_TOOLSVERSION",
7
+ "BUILD_CONFIGURATION",
8
+ "BUILD_VERBOSITY",
9
+ "BUILD_MAX_CPU_COUNT",
10
+ "BUILD_FAIL_ON_ERROR",
11
+ "BUILD_PLATFORM",
12
+ "BUILD_ARCHITECTURE",
13
+ "BUILD_MSBUILD_NODE_REUSE"
14
+ ];
15
+ env.associate(myVars, "clean");
16
+
17
+ gulp.task(
18
+ "clean",
19
+ "Invokes the 'Clean' target on all solutions in the tree",
20
+ function() {
21
+ return gulp.src("**/*.sln").pipe(
22
+ msbuild({
23
+ toolsVersion: env.resolve("BUILD_TOOLSVERSION"),
24
+ targets: ["Clean"],
25
+ configuration: env.resolve("BUILD_CONFIGURATION"),
26
+ stdout: true,
27
+ logCommand: true,
28
+ errorOnFail: env.resolveFlag("BUILD_FAIL_ON_ERROR"),
29
+ solutionPlatform: env.resolve("BUILD_PLATFORM"),
30
+ architecture: env.resolve("BUILD_ARCHITECTURE"),
31
+ verbosity: env.resolve("BUILD_VERBOSITY"),
32
+ nodeReuse: env.resolveFlag("BUILD_MSBUILD_NODE_REUSE"),
33
+ maxcpucount: env.resolveNumber("BUILD_MAX_CPU_COUNT")
34
+ })
35
+ );
36
+ }
37
+ );
@@ -1,56 +1,56 @@
1
- const gulp = requireModule("gulp"),
2
- dotNetCover = requireModule("gulp-dotnetcover"),
3
- resolveMasks = requireModule("resolve-masks"),
4
- filter = require("gulp-filter"),
5
- assemblyFilter = requireModule("net-framework-test-assembly-filter"),
6
- env = requireModule("env");
7
-
8
- const myVars = [
9
- "BUILD_CONFIGURATION",
10
- "BUILD_PLATFORM",
11
- "BUILD_ARCHITECTURE",
12
- "BUILD_TARGETS",
13
- "BUILD_TOOLSVERSION",
14
- "BUILD_VERBOSITY",
15
- "TEST_ARCHITECTURE",
16
- "TEST_EXCLUDE",
17
- "TEST_INCLUDE",
18
- "COVERAGE_ADDITIONAL_EXCLUDE",
19
- "COVERAGE_EXCLUDE"
20
- ];
21
- env.associate(myVars, [ "cover-dotnet", "quick-cover-dotnet" ]);
22
-
23
- const help = "Runs .NET tests with OpenCover or DotCover";
24
-
25
- function cover() {
26
- const
27
- configuration = env.resolve("BUILD_CONFIGURATION"),
28
- inputMasks = resolveMasks(
29
- "TEST_INCLUDE",
30
- "TEST_EXCLUDE"
31
- ).map(
32
- s => `${s}.dll`
33
- ),
34
- exclusions = env
35
- .resolveArray("COVERAGE_EXCLUDE")
36
- .concat(env.resolveArray("COVERAGE_ADDITIONAL_EXCLUDE")),
37
- include = env
38
- .resolveArray("COVERAGE_INCLUDE"),
39
- exclude = exclusions.filter(e => include.indexOf(e) === -1);
40
-
41
- return gulp
42
- .src(inputMasks, { allowEmpty: true })
43
- .pipe(filter(
44
- assemblyFilter(configuration)
45
- ))
46
- .pipe(
47
- dotNetCover({
48
- debug: false,
49
- architecture: env.resolve("TEST_ARCHITECTURE"),
50
- exclude
51
- })
52
- );
53
- }
54
-
55
- gulp.task("cover-dotnet", help, [ "build" ], cover);
56
- gulp.task("quick-cover-dotnet", help, cover);
1
+ const gulp = requireModule("gulp"),
2
+ dotNetCover = requireModule("gulp-dotnetcover"),
3
+ resolveMasks = requireModule("resolve-masks"),
4
+ filter = require("gulp-filter"),
5
+ assemblyFilter = requireModule("net-framework-test-assembly-filter"),
6
+ env = requireModule("env");
7
+
8
+ const myVars = [
9
+ "BUILD_CONFIGURATION",
10
+ "BUILD_PLATFORM",
11
+ "BUILD_ARCHITECTURE",
12
+ "BUILD_TARGETS",
13
+ "BUILD_TOOLSVERSION",
14
+ "BUILD_VERBOSITY",
15
+ "TEST_ARCHITECTURE",
16
+ "TEST_EXCLUDE",
17
+ "TEST_INCLUDE",
18
+ "COVERAGE_ADDITIONAL_EXCLUDE",
19
+ "COVERAGE_EXCLUDE"
20
+ ];
21
+ env.associate(myVars, [ "cover-dotnet", "quick-cover-dotnet" ]);
22
+
23
+ const help = "Runs .NET tests with OpenCover or DotCover";
24
+
25
+ function cover() {
26
+ const
27
+ configuration = env.resolve("BUILD_CONFIGURATION"),
28
+ inputMasks = resolveMasks(
29
+ "TEST_INCLUDE",
30
+ "TEST_EXCLUDE"
31
+ ).map(
32
+ s => `${s}.dll`
33
+ ),
34
+ exclusions = env
35
+ .resolveArray("COVERAGE_EXCLUDE")
36
+ .concat(env.resolveArray("COVERAGE_ADDITIONAL_EXCLUDE")),
37
+ include = env
38
+ .resolveArray("COVERAGE_INCLUDE"),
39
+ exclude = exclusions.filter(e => include.indexOf(e) === -1);
40
+
41
+ return gulp
42
+ .src(inputMasks, { allowEmpty: true })
43
+ .pipe(filter(
44
+ assemblyFilter(configuration)
45
+ ))
46
+ .pipe(
47
+ dotNetCover({
48
+ debug: false,
49
+ architecture: env.resolve("TEST_ARCHITECTURE"),
50
+ exclude
51
+ })
52
+ );
53
+ }
54
+
55
+ gulp.task("cover-dotnet", help, [ "build" ], cover);
56
+ gulp.task("quick-cover-dotnet", help, cover);
@@ -1,24 +1,24 @@
1
- const
2
- { publish } = require("gulp-dotnet-cli"),
3
- env = requireModule("env"),
4
- gulp = requireModule("gulp");
5
-
6
- gulp.task(
7
- "dotnet-publish",
8
- "Performs `dotnet publish` on all non-test projects in the tree",
9
- () => {
10
- const publishOpts = {
11
- configuration: env.resolve("DOTNET_PUBLISH_BUILD_CONFIGURATION", "BUILD_CONFIGURATION"),
12
- runtime: env.resolve("DOTNET_PUBLISH_RUNTIMES"),
13
- output: env.resolve("OUTPUT"),
14
- };
15
-
16
- const testInclusionsInverted = env.resolveArray("TEST_INCLUDE")
17
- .map(p => `!${p}.csproj`);
18
- return gulp
19
- .src(["**/*.csproj"].concat(testInclusionsInverted))
20
- .pipe(
21
- publish(publishOpts)
22
- );
23
- }
24
- );
1
+ const
2
+ { publish } = require("gulp-dotnet-cli"),
3
+ env = requireModule("env"),
4
+ gulp = requireModule("gulp");
5
+
6
+ gulp.task(
7
+ "dotnet-publish",
8
+ "Performs `dotnet publish` on all non-test projects in the tree",
9
+ () => {
10
+ const publishOpts = {
11
+ configuration: env.resolve("DOTNET_PUBLISH_BUILD_CONFIGURATION", "BUILD_CONFIGURATION"),
12
+ runtime: env.resolve("DOTNET_PUBLISH_RUNTIMES"),
13
+ output: env.resolve("OUTPUT"),
14
+ };
15
+
16
+ const testInclusionsInverted = env.resolveArray("TEST_INCLUDE")
17
+ .map(p => `!${p}.csproj`);
18
+ return gulp
19
+ .src(["**/*.csproj"].concat(testInclusionsInverted))
20
+ .pipe(
21
+ publish(publishOpts)
22
+ );
23
+ }
24
+ );