forked from OmniSharp/csharp-language-server-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cake
28 lines (24 loc) · 928 Bytes
/
build.cake
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
#load "nuget:?package=Rocket.Surgery.Cake.Library&version=0.9.3";
Task("Submodules")
.Does(() => {
StartProcess("git", "submodule update --init --recursive");
});
Task("Embed MediatR")
.Does(() => {
foreach (var file in GetFiles("submodules/**/*.cs"))
{
var content = System.IO.File.ReadAllText(file.FullPath);
if (content.IndexOf("namespace MediatR") > -1 || content.IndexOf("using MediatR") > -1)
{
System.IO.File.WriteAllText(file.FullPath, content
.Replace("namespace MediatR", "namespace OmniSharp.Extensions.Embedded.MediatR")
.Replace("using MediatR", "using OmniShqarp.Extensions.Embedded.MediatR")
);
}
}
});
Task("Default")
.IsDependentOn("Submodules")
.IsDependentOn("Embed MediatR")
.IsDependentOn("dotnetcore");
RunTarget(Target);