@@ -6,16 +6,26 @@ param (
66
77set-StrictMode - Version Latest
88$ErrorActionPreference = ' Stop'
9+
910Write-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
1715Push-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')
90100Write-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' ))
94104if ($buildAll -eq $true ) {
95105 $buildArgs += ' --warningsAsErrors'
96106 $buildArgs += ' true'
0 commit comments