Skip to content
Draft
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
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"docfx": {
"version": "2.81.0",
"commands": [
"docfx"
],
"rollForward": false
}
}
}
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 6 additions & 15 deletions build/build-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'
Expand Down
15 changes: 3 additions & 12 deletions build/docfx-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Loading