forked from fsprojects/FsHttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocu.ps1
39 lines (29 loc) · 813 Bytes
/
docu.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$docuIndexYamlHeader = @'
---
IMPORTANT: This file is generated by `./docu.ps1`. Please don't edit it manually!
title: FsHttp Overview
index: 1
---
'@
$readmeContent = Get-Content ./README.md -Raw
($docuIndexYamlHeader + $readmeContent) | Out-File ./docs/index.md
if ((Test-Path .\.fsdocs) -eq $true) {
Remove-Item .\.fsdocs\ -Force -Recurse
}
dotnet tool restore
dotnet build ./src/FsHttp/FsHttp.fsproj -c Release -f net8.0
# what a hack...
if ($null -eq $args[0]) {
$mode = "build"
} else {
$mode = "watch"
}
dotnet fsdocs `
$mode `
--clean `
--sourcefolder ./src `
--properties Configuration=Release TargetFramework=net8.0 `
--sourcerepo https://github.com/fsprojects/FsHttp/blob/master/src `
--parameters root /FsHttp/ `
--strict `
--output ./.docsOutput