Skip to content

Commit c75aa71

Browse files
committed
Add temporary workaround until docfx version is available that is compatible with .NET 10
1 parent d1e3af1 commit c75aa71

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

.config/dotnet-tools.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,6 @@ src/Steeltoe.io/wwwroot/*xrefmap.yml
417417

418418
# Overrides
419419
!docs/articles/releases
420+
421+
# Temporary workaround until a proper DocFX build supporting .NET 10 is available.
422+
docfx-net10-binaries/

build/build-metadata.ps1

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,26 @@ param (
66

77
set-StrictMode -Version Latest
88
$ErrorActionPreference = 'Stop'
9+
910
Write-Host "Starting value of DOCFX_SOURCE_BRANCH_NAME: '$env:DOCFX_SOURCE_BRANCH_NAME'"
1011
$OriginalSourceBranchName = $env:DOCFX_SOURCE_BRANCH_NAME
1112

12-
# Restore docfx tool
13-
dotnet tool restore
14-
1513
# Get the script's directory
1614
$baseDir = Split-Path -Parent $MyInvocation.MyCommand.Path
1715
Push-Location $baseDir
1816

17+
function EnsureDocfxBinaries() {
18+
# Temporary workaround until a proper DocFX build supporting .NET 10 is available.
19+
$zipFile = [IO.Path]::Combine($env:TEMP, 'docfx-net10-binaries.zip')
20+
21+
if (!(Test-Path -Path 'docfx-net10-binaries')) {
22+
Invoke-WebRequest -Uri 'https://ent.box.com/shared/static/7uekfex8ugc1kijt60lwx6q4n1r3d1m6.zip' -Method 'GET' -OutFile $zipFile
23+
Expand-Archive $zipFile -Force
24+
}
25+
}
26+
27+
EnsureDocfxBinaries
28+
1929
# Repository information
2030
$gitSourcesUrl = 'https://github.com/SteeltoeOSS/Steeltoe'
2131

@@ -55,8 +65,8 @@ function Clone-Source-Build-Metadata
5565

5666
Write-Output "Setting DOCFX_SOURCE_BRANCH_NAME to '$branch'"
5767
$env:DOCFX_SOURCE_BRANCH_NAME = $branch
58-
Write-Output "Running command: dotnet docfx metadata $apiFile"
59-
dotnet docfx metadata $apiFile
68+
Write-Output "Running command: dotnet exec docfx-net10-binaries/docfx.dll -- metadata $apiFile"
69+
dotnet exec docfx-net10-binaries/docfx.dll -- metadata $apiFile
6070
}
6171

6272
$buildAll = $false;
@@ -90,7 +100,7 @@ if ($SteeltoeVersion -eq 'source')
90100
Write-Output "Setting DOCFX_SOURCE_BRANCH_NAME back to '$OriginalSourceBranchName'"
91101
$env:DOCFX_SOURCE_BRANCH_NAME = $OriginalSourceBranchName
92102

93-
$buildArgs = @('docfx', 'build', (Join-Path '..' 'docs' 'docfx-all.json'))
103+
$buildArgs = @('exec', 'docfx-net10-binaries/docfx.dll', '--', 'build', (Join-Path '..' 'docs' 'docfx-all.json'))
94104
if ($buildAll -eq $true) {
95105
$buildArgs += '--warningsAsErrors'
96106
$buildArgs += 'true'

0 commit comments

Comments
 (0)