summaryrefslogtreecommitdiffhomepage
path: root/packages/sdk/stainless/generate.ts
blob: 6b1877f6b65f989b81b6be04dfe994139d85103a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bun
import { $ } from "bun"
const dir = new URL(".", import.meta.url).pathname
process.chdir(dir)

console.log("=== Generating Stainless SDK ===")
console.log(process.cwd())

await $`rm -rf go`
await $`bun run --conditions=development ../../opencode/src/index.ts generate > openapi.json`
await $`stl builds create --branch dev --pull --allow-empty --+target go`

await $`rm -rf ../go`
await $`mv opencode-go/ ../go`
await $`rm -rf ../go/.git`