publish.ts 305 B

1234567891011121314151617
  1. #!/usr/bin/env bun
  2. const dir = new URL("..", import.meta.url).pathname
  3. process.chdir(dir)
  4. import { $ } from "bun"
  5. await import("./generate")
  6. const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
  7. if (snapshot) {
  8. await $`bun publish --tag snapshot`
  9. }
  10. if (!snapshot) {
  11. await $`bun publish`
  12. }