mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-19 16:54:22 +01:00
20 lines
343 B
TypeScript
20 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`
|
|
}
|