Skip to content

Commit

Permalink
Fixes documentation generation for FAKE 5 only modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kblohm committed Apr 27, 2018
1 parent 7f99a9c commit 0433ee6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
4 changes: 3 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ open System.Reflection
//let execContext = Fake.Core.Context.FakeExecutionContext.Create false "build.fsx" []
//Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)
//#endif

#load "src/app/Fake.DotNet.FSFormatting/FSFormatting.fs"
open System.IO
open Fake.Api
open Fake.Core
Expand Down Expand Up @@ -430,12 +430,14 @@ Target.create "GenerateDocs" (fun _ ->
let dllFiles =
!! "./build/**/Fake.*.dll"
++ "./build/FakeLib.dll"
++ "./src/app/Fake.*/bin/Release/**/Fake.*.dll"
-- "./build/**/Fake.Experimental.dll"
-- "./build/**/FSharp.Compiler.Service.dll"
-- "./build/**/netcore/FAKE.FSharp.Compiler.Service.dll"
-- "./build/**/FAKE.FSharp.Compiler.Service.dll"
-- "./build/**/Fake.IIS.dll"
-- "./build/**/Fake.Deploy.Lib.dll"
|> Seq.distinctBy Path.GetFileName

Directory.ensure apidocsDir
dllFiles
Expand Down
29 changes: 15 additions & 14 deletions src/app/Fake.DotNet.FSFormatting/FSFormatting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,19 @@ let createDocsForDlls (p:MetadataFormatArguments->MetadataFormatArguments) dllFi
if arguments.LayoutRoots.IsEmpty then []
else [ "--layoutRoots" ] @ arguments.LayoutRoots

for file in dllFiles do
projectParameters
|> Seq.map (fun (k, v) -> [ k; v ])
|> Seq.concat
|> Seq.append
([ "metadataformat"; "--generate"; "--outdir"; outputDir] @ layoutroots @ libdirs @ [ "--sourceRepo"; sourceRepo;
"--sourceFolder"; arguments.Source; "--parameters" ])
|> Seq.map (fun s ->
if s.StartsWith "\"" then s
else sprintf "\"%s\"" s)
|> String.separated " "
|> fun prefix -> sprintf "%s --dllfiles \"%s\"" prefix file
|> run arguments.ToolPath

projectParameters
|> Seq.map (fun (k, v) -> [ k; v ])
|> Seq.concat
|> Seq.append
([ "metadataformat"; "--generate"; "--outdir"; outputDir] @ layoutroots @ libdirs @ [ "--sourceRepo"; sourceRepo;
"--sourceFolder"; arguments.Source; "--parameters" ])
|> Seq.map (fun s ->
if s.StartsWith "\"" then s
else sprintf "\"%s\"" s)
|> String.separated " "
|> fun prefix -> sprintf "%s --dllfiles %s" prefix (String.separated " " (dllFiles |> Seq.map (sprintf "\"%s\"")))
|> run arguments.ToolPath

printfn "Successfully generated docs for DLL %s" file

printfn "Successfully generated docs for DLLs: %s" (String.separated ", " dllFiles)

0 comments on commit 0433ee6

Please sign in to comment.