@@ -132,10 +132,9 @@ Target.create "Clean" (fun _ ->
132
132
133
133
134
134
135
-
136
- //Target "CleanDocs" (fun _ ->
137
- // CleanDirs ["docs/output"]
138
- //)
135
+ // --------------------------------------------------------------------------------------
136
+ // Clean the folders created by fsdocs when generating documentation
137
+ Target.create " CleanDocs" ( fun _ -> !! " output" ++ " .fsdocs" |> Shell.cleanDirs)
139
138
140
139
// --------------------------------------------------------------------------------------
141
140
// Build library & test project
@@ -149,6 +148,22 @@ Target.create "Build" (fun _ ->
149
148
150
149
DotNet.build setParams " ExcelProvider.sln" )
151
150
151
+ // --------------------------------------------------------------------------------------
152
+ // Generate the documentation
153
+ Target.create " GenerateDocs" ( fun _ ->
154
+
155
+ let result =
156
+ DotNet.exec
157
+ id
158
+ " fsdocs"
159
+ ( " build --properties Configuration=Release --strict --eval --clean --parameters fsdocs-package-version "
160
+ + release.NugetVersion)
161
+
162
+ if not result.OK then
163
+ printfn " Errors while generating docs: %A " result.Messages
164
+ failwith " Failed to generate docs" )
165
+
166
+
152
167
153
168
// --------------------------------------------------------------------------------------
154
169
// Run the unit tests using test runner
@@ -382,8 +397,7 @@ Target.create "All" ignore
382
397
==> " Build"
383
398
==> " RunTests"
384
399
==> " CopyBinaries"
385
- // ==> "GenerateReferenceDocs"
386
- // ==> "GenerateDocs"
400
+ ==> " GenerateDocs"
387
401
==> " All"
388
402
// =?> ("ReleaseDocs",isLocalBuild)
389
403
0 commit comments