fix: stabilize compound-engineering component counts (#299)
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
#!/usr/bin/env bun
|
||||
import path from "path"
|
||||
import { validateReleasePleaseConfig } from "../../src/release/config"
|
||||
import { syncReleaseMetadata } from "../../src/release/metadata"
|
||||
import { getCompoundEngineeringCounts, syncReleaseMetadata } from "../../src/release/metadata"
|
||||
import { readJson } from "../../src/utils/files"
|
||||
|
||||
const releasePleaseConfig = await readJson<{ packages: Record<string, unknown> }>(
|
||||
path.join(process.cwd(), ".github", "release-please-config.json"),
|
||||
)
|
||||
const configErrors = validateReleasePleaseConfig(releasePleaseConfig)
|
||||
const counts = await getCompoundEngineeringCounts(process.cwd())
|
||||
const result = await syncReleaseMetadata({ write: false })
|
||||
const changed = result.updates.filter((update) => update.changed)
|
||||
|
||||
if (configErrors.length === 0 && changed.length === 0) {
|
||||
console.log("Release metadata is in sync.")
|
||||
console.log(
|
||||
`Release metadata is in sync. compound-engineering currently has ${counts.agents} agents, ${counts.skills} skills, and ${counts.mcpServers} MCP server${counts.mcpServers === 1 ? "" : "s"}.`,
|
||||
)
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
@@ -28,5 +31,8 @@ if (changed.length > 0) {
|
||||
for (const update of changed) {
|
||||
console.error(`- ${update.path}`)
|
||||
}
|
||||
console.error(
|
||||
`Current compound-engineering counts: ${counts.agents} agents, ${counts.skills} skills, ${counts.mcpServers} MCP server${counts.mcpServers === 1 ? "" : "s"}.`,
|
||||
)
|
||||
}
|
||||
process.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user