File tree Expand file tree Collapse file tree 6 files changed +36
-10
lines changed
src/CodeGeneration/DocGenerator Expand file tree Collapse file tree 6 files changed +36
-10
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,30 @@ open System
88open Fake
99
1010open Paths
11+ open System.IO
1112
1213module Documentation =
1314
14- let RunLitterateur = fun _ ->
15- let litterateur = " src/CodeGeneration/Nest.Litterateur/bin/Release/Nest.Litterateur .exe"
15+ let Generate () =
16+ let generator = " build/output/v4.6/DocGenerator/DocGenerator .exe"
1617 ExecProcess ( fun p ->
17- p.WorkingDirectory <- " src/CodeGeneration/Nest.Litterateur/bin/Release "
18- p.FileName <- litterateur
18+ p.WorkingDirectory <- " src/CodeGeneration/DocGenerator "
19+ p.FileName <- generator
1920 )
2021 ( TimeSpan.FromMinutes ( 1.0 )) |> ignore
2122
23+ // TODO: hook documentation validation into the process
24+ let Validate () =
25+ let elasticDocsDir = " ../elasticsearch-docs"
26+ if ( directoryExists elasticDocsDir = false ) then
27+ let fullPath = combinePaths currentDirectory elasticDocsDir |> Path.GetFullPath
28+ traceFAKE " No elasticsearch docs repo found at %s . Cannot validate generated documentation" fullPath
29+ //else
30+ // Needs to be able to run the build_docs.pl perl script. The best options on Windows for this
31+ // are Cygwin or Linux Bash for Windows.
32+ //let docBuildScript = combinePaths elasticDocsDir "build_docs.pl"
2233
2334
35+ |> ignore
36+
2437
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module Projects =
2929
3030 type PrivateProject =
3131 | Tests
32-
32+ | DocGenerator
3333
3434
3535 type DotNetProject =
@@ -55,6 +55,7 @@ module Projects =
5555 | PrivateProject p ->
5656 match p with
5757 | Tests -> " Tests"
58+ | DocGenerator -> " DocGenerator"
5859
5960 static member TryFindName ( name : string ) =
6061 DotNetProject.All
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ open Versioning
1919open Releasing
2020open Profiling
2121open XmlDocPatcher
22+ open Documentation
2223
2324// Default target
2425Target " Build" <| fun _ -> traceHeader " STARTING BUILD"
@@ -32,13 +33,17 @@ Target "Test" <| fun _ -> Tests.RunUnitTests()
3233Target " InheritDoc" <| fun _ -> InheritDoc.patchInheritDocs()
3334
3435Target " TestForever" <| fun _ -> Tests.RunUnitTestsForever()
35-
36+
3637Target " Integrate" <| fun _ -> Tests.RunIntegrationTests ( getBuildParamOrDefault " esversions" " " ) ( getBuildParamOrDefault " escluster" " " ) ( getBuildParamOrDefault " testfilter" " " )
3738
3839Target " Profile" <| fun _ -> Profiler.Run()
3940
4041Target " Benchmark" <| fun _ -> Benchmarker.Run()
4142
43+ Target " Documentation" <| fun _ -> Documentation.Generate()
44+
45+ Target " QuickCompile" <| fun _ -> Build.QuickCompile()
46+
4247Target " Version" <| fun _ ->
4348 Versioning.PatchAssemblyInfos()
4449 Versioning.PatchProjectJsons()
@@ -60,6 +65,7 @@ Target "Canary" <| fun _ ->
6065 ==> " BuildApp"
6166 =?> ( " Test" , ( not (( getBuildParam " skiptests" ) = " 1" )))
6267 ==> " InheritDoc"
68+ ==> " Documentation"
6369 ==> " Build"
6470
6571" Clean"
Original file line number Diff line number Diff line change 2020 <DebugSymbols >true</DebugSymbols >
2121 <DebugType >full</DebugType >
2222 <Optimize >false</Optimize >
23- <OutputPath >..\Nest.Litterateur\ bin\Net45 \Debug\</OutputPath >
23+ <OutputPath >bin\Debug\</OutputPath >
2424 <DefineConstants >DEBUG;TRACE</DefineConstants >
2525 <ErrorReport >prompt</ErrorReport >
2626 <WarningLevel >4</WarningLevel >
2929 <PlatformTarget >AnyCPU</PlatformTarget >
3030 <DebugType >pdbonly</DebugType >
3131 <Optimize >true</Optimize >
32- <OutputPath >..\Nest.Litterateur\ bin\Net45 \Release\</OutputPath >
32+ <OutputPath >bin\Release\</OutputPath >
3333 <DefineConstants >TRACE</DefineConstants >
3434 <ErrorReport >prompt</ErrorReport >
3535 <WarningLevel >4</WarningLevel >
Original file line number Diff line number Diff line change @@ -39,9 +39,15 @@ public static void Go(string[] args)
3939 file . SaveToDocumentationFolder ( ) ;
4040 }
4141
42+ Console . ForegroundColor = ConsoleColor . Green ;
43+ Console . WriteLine ( "Documentation generated." ) ;
44+ Console . ResetColor ( ) ;
45+
4246 if ( Debugger . IsAttached )
47+ {
4348 Console . WriteLine ( "Press any key to continue..." ) ;
4449 Console . ReadKey ( ) ;
50+ }
4551 }
4652 }
4753}
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ static Program()
1414 }
1515 else
1616 {
17- InputDirPath = @"..\..\..\..\..\..\ src\Tests" ;
18- OutputDirPath = @"..\..\..\..\..\..\ docs" ;
17+ InputDirPath = @"..\..\..\..\..\src\Tests" ;
18+ OutputDirPath = @"..\..\..\..\..\docs" ;
1919 }
2020 }
2121
You can’t perform that action at this time.
0 commit comments