Skip to content

Commit e244d3c

Browse files
committed
CSHARP-1851: Added ApiDocs task to build.cake.
1 parent 60d995a commit e244d3c

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

Docs/Api/CSharpDriverDocs.shfbproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
33
<PropertyGroup>
4+
<SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)..\..\packages\EWSoftware.SHFB.2017.1.28.0\Tools\</SHFBROOT>
5+
<ComponentPath>$(MSBuildThisFileDirectory)..\..\packages</ComponentPath>
46
<!-- The configuration and platform will be used to determine which
57
assemblies to include from solution and project documentation
68
sources -->

build.cake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,30 @@ Task("TestLinux")
115115
Task("Test")
116116
.IsDependentOn("TestWindows");
117117

118+
Task("ApiDocs")
119+
.Does(() =>
120+
{
121+
var tempDirectory = artifactsDirectory + Directory("tmp");
122+
EnsureDirectoryExists(tempDirectory);
123+
CleanDirectory(tempDirectory);
124+
125+
var apiDocsDirectory = solutionDirectory + Directory("Docs") + Directory("Api");
126+
var shfbprojFile = apiDocsDirectory + File("CSharpDriverDocs.shfbproj");
127+
var preliminary = true;
128+
var helpFileVersion = "2.4.4"; // should have build number?
129+
MSBuild(shfbprojFile, new MSBuildSettings
130+
{
131+
Configuration = "Release"
132+
}
133+
.WithProperty("OutputPath", tempDirectory)
134+
.WithProperty("CleanIntermediate", "True")
135+
.WithProperty("Preliminary", preliminary ? "True" : "False")
136+
.WithProperty("HelpFileVersion", helpFileVersion)
137+
);
138+
139+
// DeleteDirectory(tempDirectory, recursive: true);
140+
});
141+
118142
Task("RefDocs")
119143
.Does(() =>
120144
{

src/MongoDB.Driver/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
4+
<package id="EWSoftware.SHFB" version="2017.1.28.0" targetFramework="net45" />
5+
<package id="EWSoftware.SHFB.NETFramework" version="4.6.2" targetFramework="net45" />
46
</packages>

0 commit comments

Comments
 (0)