-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
48 lines (40 loc) · 1.52 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
var gulp = require("gulp");
var config = require("./gulp-config.js");
var msbuild = require("gulp-msbuild");
var foreach = require("gulp-foreach");
var debug = require("gulp-debug");
var path = require("path");
var args = require('yargs').argv;
gulp.task('push', function() {
publishProjects(config.solutionPath + "\\src", config.websitePath)
});
gulp.task('push-domain', function() {
publishProjects(config.solutionPath + "\\src\\Domain", config.websitePath)
});
var publishProjects = function(location, dest) {
var targets = ["Build"];
console.log("PUBLISH TO: " + dest + " folder");
return gulp.src([location + "/**/*.csproj"])
.pipe(foreach(function(stream, file) {
return stream
.pipe(debug({ title: "Building project:" }))
.pipe(msbuild({
targets: targets,
configuration: config.buildConfiguration,
logCommand: false,
verbosity: "minimal",
stdout: true,
errorOnFail: true,
maxcpucount: 0,
toolsVersion: 14.0,
properties: {
DeployOnBuild: "true",
DeployDefaultTarget: "WebPublish",
WebPublishMethod: "FileSystem",
DeleteExistingFiles: "false",
publishUrl: dest,
_FindDependencies: "false"
}
}));
}));
};