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
1 change: 1 addition & 0 deletions .github/workflows/update-integration-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
src/frontend/src/data/github-stats.json \
src/frontend/src/data/samples.json \
src/frontend/src/data/aspire-blog-posts.json \
src/frontend/src/data/schemas \
src/frontend/src/assets/samples \
src/frontend/src/data/pkgs \
src/frontend/src/data/ts-modules \
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"test:e2e:serve": "pnpm git-env && pnpm check-data && astro dev --host 127.0.0.1 --port 4321",
"lint": "pnpm git-env && pnpm exec astro sync && pnpm verify-skill-digests && eslint . --max-warnings 0",
"format": "prettier -w --cache --plugin prettier-plugin-astro .",
"update:all": "pnpm update:integrations && pnpm update:github-stats && pnpm update:samples && pnpm update:blogs",
"update:all": "pnpm update:integrations && pnpm update:github-stats && pnpm update:samples && pnpm update:blogs && pnpm update:schemas",
"update:blogs": "tsx ./scripts/update-blogs.ts",
"update:schemas": "tsx ./scripts/update-schemas.ts",
"update:integrations": "tsx ./scripts/update-integrations.ts",
Expand Down
20 changes: 19 additions & 1 deletion src/frontend/scripts/update-integration-data.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
reliable scripting that runs identically in CI and locally.

Phases:
1. `pnpm update:all` — integration metadata, GitHub stats, samples, official blog archive.
1. `pnpm update:all` — integration metadata, GitHub stats, samples, official blog archive,
and Aspire CLI config schemas for new microsoft/aspire releases.
Reconciles documentation mappings, then runs structured-data tests.
2. Version-change detection — compares the committed
aspire-integrations.json against the freshly written one by package
Expand Down Expand Up @@ -76,6 +77,7 @@ $AllowedPaths = @(
'src/frontend/src/data/github-stats.json',
'src/frontend/src/data/samples.json',
'src/frontend/src/data/aspire-blog-posts.json',
'src/frontend/src/data/schemas/',
'src/frontend/src/assets/samples/',
'src/frontend/src/data/pkgs/',
'src/frontend/src/data/ts-modules/',
Expand Down Expand Up @@ -516,21 +518,36 @@ elseif ($versionsChanged -and $SkipRegen) {
Write-Section 'Phase 5 — scope check'
$allStatus = @(Invoke-Git @('status', '--porcelain') | Where-Object { $_ -and $_.Trim().Length -gt 0 })
$outOfScope = [System.Collections.Generic.List[string]]::new()
# A release's schema never changes after it ships, so the updater may only add
# versioned schema files. Modifying, deleting, or renaming one is a violation.
$publishedSchemaPattern = '^src/frontend/src/data/schemas/aspire-config\..+\.schema\.json$'
$changedPublishedSchemas = [System.Collections.Generic.List[string]]::new()
foreach ($line in $allStatus) {
# Porcelain format: "XY <path>" (path starts at column 4). Handle renames "old -> new".
$statusCode = $line.Substring(0, 2)
$path = ($line.Substring(3)).Trim()
if ($path -match ' -> ') { $path = ($path -split ' -> ')[-1].Trim() }
$path = $path.Trim('"')
if (-not (Test-PathAllowed -RelPath $path)) {
$outOfScope.Add($path)
}
$isNewFile = $statusCode -eq '??' -or $statusCode[0] -eq 'A'
if (($path -replace '\\', '/') -match $publishedSchemaPattern -and -not $isNewFile) {
$changedPublishedSchemas.Add($path)
}
}
if ($outOfScope.Count -gt 0) {
Write-Error ("Working tree contains changes outside the allowed data paths:`n " +
($outOfScope -join "`n ") +
"`nAborting; no PR will be opened.")
exit 1
}
if ($changedPublishedSchemas.Count -gt 0) {
Write-Error ("Published Aspire CLI config schemas never change, but these were modified, deleted, or renamed:`n " +
($changedPublishedSchemas -join "`n ") +
"`nAborting; no PR will be opened.")
exit 1
}
Write-Host "All changes are within the allowed data paths." -ForegroundColor Green

# ── File-count summary (for the PR body) ────────────────────────────────────
Expand Down Expand Up @@ -572,6 +589,7 @@ $sb = [System.Text.StringBuilder]::new()
[void]$sb.AppendLine("- ``src/frontend/src/data/github-stats.json`` — repository statistics")
[void]$sb.AppendLine("- ``src/frontend/src/data/samples.json`` — sample metadata, when changed")
[void]$sb.AppendLine("- ``src/frontend/src/data/aspire-blog-posts.json`` — complete official Aspire blog metadata, when changed")
[void]$sb.AppendLine("- ``src/frontend/src/data/schemas/`` — Aspire CLI config schemas, when microsoft/aspire ships a new release")
[void]$sb.AppendLine("- ``src/frontend/src/assets/samples/`` — sample thumbnails, when changed")
[void]$sb.AppendLine("")
[void]$sb.AppendLine("### API reference regeneration")
Expand Down
Loading
Loading