-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathdoc-build.proj
72 lines (55 loc) · 3.25 KB
/
doc-build.proj
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
71
72
<Project ToolsVersion="4.0"
DefaultTargets="doc-build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- perform a release build by default -->
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
<Edition Condition="'$(Edition)'==''">desktop</Edition>
<!-- path to the root of the repo artifacts; locations for various content will be inferred from this -->
<RootPath Condition="'$(RootPath)'==''">$(MSBuildProjectDirectory)\..</RootPath>
<!-- expected location of SDK assemblies to be consumed by generator; these should have been fetched via
the get-references (=> get-reference-sdk) target
-->
<SDKAssembliesFolder Condition="'$(SDKAssembliesFolder)'==''">$(RootPath)\Include\sdk\assemblies\net45</SDKAssembliesFolder>
<!-- the relative location (to the project file) of the generator executable -->
<GeneratorPath>$(RootPath)\generator\AWSPSGenerator\bin\$(Configuration)</GeneratorPath>
<Generator>AWSPSGenerator.exe</Generator>
<DocBuildReleaseBuild Condition="'$(DocBuildReleaseBuild)'==''">False</DocBuildReleaseBuild>
<!-- default output path to ..\DocDeployment\docs if not specified -->
<DocOutputRoot Condition="'$(DocOutputRoot)'==''">$(MSBuildProjectDirectory)\..\DocDeployment\docs</DocOutputRoot>
<!-- the domain in which the China (Beijing), cn-north-1, doc assets are hosted (injected into docs) -->
<CNNorth1RegionDocsDomain Condition="'$(CNNorth1RegionDocsDomain)'==''">docs.amazonaws.cn</CNNorth1RegionDocsDomain>
</PropertyGroup>
<Choose>
<When Condition="'$(DocBuildReleaseBuild)'=='True' ">
<PropertyGroup>
<Deployment Condition="'$(Deployment)'==''">$(RootPath)\Include\PowerShell\AWSPowerShell</Deployment>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<Deployment Condition="'$(Deployment)'==''">$(RootPath)\Deployment\AWSPowerShell</Deployment>
</PropertyGroup>
</Otherwise>
</Choose>
<Target Name="doc-build" DependsOnTargets="setup-production-doc-build;build-docgenerator">
<Message Text="Generating web cmdlet reference"/>
<Exec Command="$(GeneratorPath)\$(Generator) -sdk $(SDKAssembliesFolder) -rp $(RootPath) -t webhelp -ml $(Deployment) -dof $(DocOutputRoot) -e $(Edition)" />
<CreateSitemapTask
SourceFolder="$(DocOutputRoot)"
BaseUrl="http://docs.aws.amazon.com/powershell/latest/reference/"
OutputFile="$(DocOutputRoot)\sitemap.xml"
/>
</Target>
<Target Name="setup-production-doc-build" Condition="'$(DocBuildReleaseBuild)'=='True'">
<MSBuild Projects ="$(MSBuildProjectFullPath)" Targets="get-reference-powershell" Properties="TargetRepository=$(MSBuildProjectDirectory)\.."/>
</Target>
<Target Name="optional-build-tools" Condition="'$(DocBuildReleaseBuild)'!='True'">
<MSBuild Projects ="$(MSBuildProjectFullPath)" Targets="build-tools"/>
</Target>
<Target Name="build-docgenerator">
<!-- PowerShell's generator handles source and doc gen -->
<Message Text="Building AWS PowerShell generator"/>
<Exec Command="$(devenv2013) /Rebuild $(Configuration) $(RootPath)\solutions\AWSPowerShellGenerator.sln"/>
</Target>
</Project>