Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Follow the steps below to run/debug locally. The optional steps take longer, but
1. Optional: Only process Markdown files in `docs`:

```shell
dotnet tool restore && dotnet docfx build docs/docfx.json --warningsAsErrors true
pwsh build/docfx-build.ps1
```

1. Open [Steeltoe.io.slnx](src/Steeltoe.io.slnx) in your preferred IDE, or run from the command line:
Expand Down
29 changes: 29 additions & 0 deletions build/docfx-build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env pwsh

set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

function EnsureDocfxBinaries() {
# Temporary workaround until a proper DocFX build supporting .NET 10 is available.
$zipFile = [IO.Path]::Combine($env:TEMP, 'docfx-net10-binaries.zip')

if (!(Test-Path -Path 'docfx-net10-binaries')) {
Invoke-WebRequest -Uri 'https://ent.box.com/shared/static/3b9s1j71jmcsbjgug0yjel8fohk1n720.zip' -Method 'GET' -OutFile $zipFile
Comment thread
bart-vmware marked this conversation as resolved.
Expand-Archive $zipFile -Force
}
}

# Get the script's directory
$baseDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Push-Location $baseDir

try {
EnsureDocfxBinaries

$buildArgs = @('exec', 'docfx-net10-binaries/docfx.dll', 'build', (Join-Path '..' 'docs' 'docfx.json'), '--warningsAsErrors', 'true')
Write-Output "Running command: dotnet $buildArgs"
dotnet $buildArgs
}
finally {
Pop-Location
}
Loading