mirror of
https://github.com/sst/opencode.git
synced 2025-08-23 22:44:08 +00:00
19 lines
343 B
TypeScript
19 lines
343 B
TypeScript
#!/usr/bin/env bun
|
|
|
|
const dir = new URL("..", import.meta.url).pathname
|
|
process.chdir(dir)
|
|
|
|
import { $ } from "bun"
|
|
|
|
await import("./generate")
|
|
await $`rm -rf dist`
|
|
await $`bun tsc`
|
|
|
|
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
|
|
|
|
if (snapshot) {
|
|
await $`bun publish --tag snapshot`
|
|
}
|
|
if (!snapshot) {
|
|
await $`bun publish`
|
|
}
|