Skip to content

Commit

Permalink
Fixed tips generation - isssue #45
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-tihon committed Jan 24, 2014
1 parent c970373 commit d2eea90
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions docs/tools/generate.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,29 @@ let buildDocumentation () =
( dir, docTemplate, output @@ sub, replacements = ("root", root)::info,
layoutRoots = layoutRoots )

// Remove `FSharp.Core` from `bin` directory.
// Otherwise, version conflict can break code tips.
let execute pipeline =
// Cache `FSharp.Core.*` files
let files =
!! (bin @@ "FSharp.Core.*")
|> Seq.toArray
|> Array.map (fun file ->
(file, File.ReadAllBytes file))
// Remove `FSharp.Core.*` files
files |> Seq.iter (fun (file,_) ->
printfn "Removing '%s'" file
File.Delete file)
// Execute document generation pipeline
pipeline()
// Restore `FSharp.Core.*` files
files |> Seq.iter (fun (file, bytes) ->
printfn "Restoring '%s'" file
File.WriteAllBytes(file, bytes))


// Generate
copyFiles()
buildDocumentation()
buildReference()
execute(
copyFiles
>> buildDocumentation
>> buildReference)

0 comments on commit d2eea90

Please sign in to comment.