mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-19 00:34:23 +01:00
19 lines
364 B
TypeScript
19 lines
364 B
TypeScript
#!/usr/bin/env bun
|
|
|
|
const dir = new URL("..", import.meta.url).pathname
|
|
process.chdir(dir)
|
|
|
|
import { $ } from "bun"
|
|
|
|
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
|
|
|
|
await $`bun tsc`
|
|
|
|
if (snapshot) {
|
|
await $`bun publish --tag snapshot --access public`
|
|
await $`git checkout package.json`
|
|
}
|
|
if (!snapshot) {
|
|
await $`bun publish --access public`
|
|
}
|