diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 00000000..18264e64 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "docfx": { + "version": "2.81.0", + "commands": [ + "docfx" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 18d49eb9..6d0e7c83 100644 --- a/.editorconfig +++ b/.editorconfig @@ -158,6 +158,3 @@ dotnet_diagnostic.IDE0270.severity = silent # JSON002: Probable JSON string detected dotnet_diagnostic.JSON002.severity = silent - -# CA1848: Use the LoggerMessage delegates (depends on https://github.com/SteeltoeOSS/Steeltoe/issues/969) -dotnet_diagnostic.CA1848.severity = silent diff --git a/.gitignore b/.gitignore index 6fd66bfb..80d69e99 100644 --- a/.gitignore +++ b/.gitignore @@ -457,8 +457,5 @@ src/Steeltoe.io/wwwroot/*xrefmap.yml # Overrides !docs/articles/releases -# Temporary workaround until a proper DocFX build supporting .NET 10 is available. -docfx-net10-binaries/ - # lychee link-checker cache .lycheecache diff --git a/build/README.md b/build/README.md index 63f6f4be..6f6fdd57 100644 --- a/build/README.md +++ b/build/README.md @@ -22,7 +22,7 @@ This process can take a while to complete, will display many warnings and may in ## What does the script do? -1. Download docfx binaries (temporary workaround for .NET 10 support) +1. Install docfx (by running `dotnet tool restore`) 1. Clone several copies of Steeltoe (using [metadata.conf](./metadata.conf) to identify checkout targets) 1. Run `docfx metadata api-v{version}.json` for each copy 1. This command will produce many yaml files and place them in [docs](../docs), alongside the index pages for each API version diff --git a/build/build-metadata.ps1 b/build/build-metadata.ps1 index 2977d81f..1584120c 100644 --- a/build/build-metadata.ps1 +++ b/build/build-metadata.ps1 @@ -10,22 +10,13 @@ $ErrorActionPreference = 'Stop' Write-Host "Starting value of DOCFX_SOURCE_BRANCH_NAME: '$env:DOCFX_SOURCE_BRANCH_NAME'" $OriginalSourceBranchName = $env:DOCFX_SOURCE_BRANCH_NAME +# Restore docfx tool +dotnet tool restore + # Get the script's directory $baseDir = Split-Path -Parent $MyInvocation.MyCommand.Path Push-Location $baseDir -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 - Expand-Archive $zipFile -Force - } -} - -EnsureDocfxBinaries - # Repository information $gitSourcesUrl = 'https://github.com/SteeltoeOSS/Steeltoe' @@ -65,8 +56,8 @@ function Clone-Source-Build-Metadata Write-Output "Setting DOCFX_SOURCE_BRANCH_NAME to '$branch'" $env:DOCFX_SOURCE_BRANCH_NAME = $branch - Write-Output "Running command: dotnet exec docfx-net10-binaries/docfx.dll metadata $apiFile" - dotnet exec docfx-net10-binaries/docfx.dll metadata $apiFile + Write-Output "Running command: dotnet docfx metadata $apiFile" + dotnet docfx metadata $apiFile } $buildAll = $false; @@ -100,7 +91,7 @@ if ($SteeltoeVersion -eq 'source') Write-Output "Setting DOCFX_SOURCE_BRANCH_NAME back to '$OriginalSourceBranchName'" $env:DOCFX_SOURCE_BRANCH_NAME = $OriginalSourceBranchName -$buildArgs = @('exec', 'docfx-net10-binaries/docfx.dll', 'build', (Join-Path '..' 'docs' 'docfx-all.json')) +$buildArgs = @('docfx', 'build', (Join-Path '..' 'docs' 'docfx-all.json')) if ($buildAll -eq $true) { $buildArgs += '--warningsAsErrors' $buildArgs += 'true' diff --git a/build/docfx-build.ps1 b/build/docfx-build.ps1 index a10c6766..2417419c 100644 --- a/build/docfx-build.ps1 +++ b/build/docfx-build.ps1 @@ -3,24 +3,15 @@ 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 - Expand-Archive $zipFile -Force - } -} +# Restore docfx tool +dotnet tool restore # 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') + $buildArgs = @('docfx', 'build', (Join-Path '..' 'docs' 'docfx.json'), '--warningsAsErrors', 'true') Write-Output "Running command: dotnet $buildArgs" dotnet $buildArgs }