2
0

publish.ts 364 B

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