chore(http-recorder): disable release automation
This commit is contained in:
parent
f63469f04e
commit
4511d05c61
7 changed files with 12 additions and 288 deletions
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bun
|
||||
import { $ } from "bun"
|
||||
import { fileURLToPath } from "node:url"
|
||||
import { pack } from "./pack.js"
|
||||
import { verifyPackage } from "./verify-package.js"
|
||||
|
||||
const dir = fileURLToPath(new URL("..", import.meta.url))
|
||||
process.chdir(dir)
|
||||
|
||||
const published = async (name: string, version: string) =>
|
||||
(await $`npm view ${name}@${version} version`.nothrow()).exitCode === 0
|
||||
|
||||
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion -- package.json is validated by the package schema and build checks.
|
||||
const pkg = JSON.parse(await Bun.file("package.json").text()) as { readonly name: string; readonly version: string }
|
||||
|
||||
if (await published(pkg.name, pkg.version)) {
|
||||
console.log(`already published ${pkg.name}@${pkg.version}`)
|
||||
} else {
|
||||
const archive = await pack()
|
||||
try {
|
||||
await verifyPackage(archive)
|
||||
await $`npm publish ${archive} --tag beta --access public --provenance`
|
||||
} finally {
|
||||
await Bun.file(archive).delete()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bun
|
||||
import { $ } from "bun"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
const packages = await Array.fromAsync(
|
||||
new Bun.Glob("packages/**/package.json").scan({
|
||||
cwd: fileURLToPath(new URL("../../../", import.meta.url)),
|
||||
absolute: true,
|
||||
}),
|
||||
)
|
||||
const ignored = (
|
||||
await Promise.all(packages.map(async (file) => (await Bun.file(file).json()) as { readonly name?: string }))
|
||||
)
|
||||
.map((pkg) => pkg.name)
|
||||
.filter((name): name is string => name !== undefined && name !== "@opencode-ai/http-recorder")
|
||||
.flatMap((name) => ["--ignore", name])
|
||||
|
||||
await $`bunx changeset version ${ignored}`
|
||||
Loading…
Add table
Add a link
Reference in a new issue