Skip to content

Commit 2d6a6ec

Browse files
committed
feat(ci): signal the pipeline that docs generation failed
1 parent 5e5b4d0 commit 2d6a6ec

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/loaders/apirefloader.fsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ let loader (projectRoot: string) (siteContet: SiteContents) =
4141
Path.Combine(projectDir, "bin", "Release", "FSharpLint.Core.dll")
4242
Path.Combine(projectDir, "bin", "Debug", "FSharpLint.Core.dll")
4343
]
44-
44+
4545
let foundDll = possiblePaths |> List.tryFind File.Exists
46-
46+
4747
match foundDll with
4848
| Some dllPath ->
4949
let binDir = Path.GetDirectoryName(dllPath)
5050
printfn "Found assembly at: %s" dllPath
5151
printfn "Using lib directory: %s" binDir
52-
52+
5353
let libs = [binDir]
54-
54+
5555
// Try to load with minimal dependencies first
5656
let inputs = [ApiDocInput.FromFile(dllPath)]
5757
try
5858
let output = ApiDocs.GenerateModel(inputs, "FSharpLint.Core", [], libDirs = libs)
59-
59+
6060
let allModules =
6161
output.Collection.Namespaces
6262
|> List.collect (fun n ->
@@ -102,6 +102,7 @@ let loader (projectRoot: string) (siteContet: SiteContents) =
102102
printfn "Warning: Could not find FSharpLint.Core.dll in any of the expected locations:"
103103
possiblePaths |> List.iter (printfn " - %s")
104104
printfn "API documentation will not be generated."
105+
Environment.ExitCode <- 1
105106
with
106107
| ex ->
107108
printfn "Error in API reference loader: %A" ex

0 commit comments

Comments
 (0)