diff options
Diffstat (limited to 'script')
| -rwxr-xr-x | script/format.ts | 9 | ||||
| -rw-r--r-- | script/generate.ts | 12 |
2 files changed, 12 insertions, 9 deletions
diff --git a/script/format.ts b/script/format.ts index 2ae93f169..996de9ad0 100755 --- a/script/format.ts +++ b/script/format.ts @@ -3,12 +3,3 @@ import { $ } from "bun" await $`bun run prettier --ignore-unknown --write .` - -if (process.env["CI"] && (await $`git status --porcelain`.text())) { - await $`git config --local user.email "[email protected]"` - await $`git config --local user.name "GitHub Action"` - await $`git add -A` - await $`git commit -m "chore: format code"` - const branch = process.env["PUSH_BRANCH"] - await $`git push origin HEAD:${branch} --no-verify` -} diff --git a/script/generate.ts b/script/generate.ts new file mode 100644 index 000000000..6a040e2e4 --- /dev/null +++ b/script/generate.ts @@ -0,0 +1,12 @@ +#!/usr/bin/env bun + +import { $ } from "bun" + +// Build SDK +await $`bun ./packages/sdk/js/script/build.ts` + +// Generate openapi.json +await $`bun dev generate > ../sdk/openapi.json`.cwd("packages/opencode") + +// Format +await $`./script/format.ts` |
