blob: cbac640afd49e9900c3d6459c98f17100c6fe0ad (
plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Properties that must be set for these targets to function:
$(BranchName): The name of the branch being built. Used to determine the web subdirectory for publishing.
For creating web sites:
$(PublishDocsWebSiteName): The name of the web site under which the documentation web applications will be created/deleted.
For creating or publishing to web sites:
$(DocWebRoot): the full physical path to where documentation should be copied to, excluding $(BranchName)
-->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " />
<Import Project="..\tools\DotNetOpenAuth.automated.props"/>
<Target Name="Build" DependsOnTargets="Chm" Condition=" '$(NoDocumentation)' != 'true' " />
<Target Name="Prepare">
<Error Text="The BranchName property must be set." Condition=" '$(BranchName)' == '' " />
<Error Text="The DocWebRoot property must be set." Condition=" '$(DocWebRoot)' == '' " />
<PropertyGroup>
<PublishDocsWebSiteVirtualPath>/$(BranchName)</PublishDocsWebSiteVirtualPath>
</PropertyGroup>
</Target>
<Target Name="PrepareForPublish" DependsOnTargets="BuildProduct;Html">
<PropertyGroup>
<DocZip>$(DropDirectoryNoSlash)-htmldoc$(ZipFormat)</DocZip>
</PropertyGroup>
<ItemGroup>
<DocSources Include="$(ProjectRoot)doc\api\**\*" />
</ItemGroup>
</Target>
<Target Name="DeployableArchive"
DependsOnTargets="PrepareForPublish"
Inputs="@(DocSources)"
Outputs="$(DocZip)">
<Delete Files="$(DocZip)" />
<AddFilesTo7Zip
Files="@(DocSources)"
ZipFileName="$(DocZip)"
WorkingDirectory="$(ProjectRoot)doc\api\"
ToolPath="$(Zip7ToolPath)" />
</Target>
<Target Name="Publish"
DependsOnTargets="DeployableArchive" />
<Target Name="CreateSiteOnIis" DependsOnTargets="Prepare">
<Error Text="The PublishDocsWebSiteName property must be set." Condition=" '$(PublishDocsWebSiteName)' == '' "/>
<CreateWebApplication
WebSiteName="$(PublishDocsWebSiteName)"
PhysicalPaths="$(DocWebRoot)\$(BranchName)"
VirtualPaths="$(PublishDocsWebSiteVirtualPath)"
/>
</Target>
<Target Name="DeleteSiteOnIis" DependsOnTargets="Prepare">
<Error Text="The PublishDocsWebSiteName property must be set." Condition=" '$(PublishDocsWebSiteName)' == '' "/>
<DeleteWebApplication
WebSiteName="$(PublishDocsWebSiteName)"
VirtualPaths="$(PublishDocsWebSiteVirtualPath)"
/>
</Target>
<Import Project="$(ProjectRoot)tools\Documentation.targets"/>
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
</Project>
|