This commit is contained in:
Dax Raad 2025-07-31 00:37:41 -04:00
parent 4a07d7ecd3
commit 1e4c526970
5 changed files with 12 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.0.5",
"version": "0.0.0",
"name": "opencode",
"type": "module",
"private": true,

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bun
const dir = new URL("..", import.meta.url).pathname
process.chdir(dir)
import { $ } from "bun"
import pkg from "../package.json"

View file

@ -1,11 +1,11 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "0.0.0",
"type": "module",
"exports": {
".": "./dist/index.js"
},
"version": "0.0.0",
"files": [
"dist"
],

View file

@ -17,8 +17,8 @@ const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
await $`bun pm version --allow-same-version --no-git-tag-version ${version}`
if (snapshot) {
await $`bun publish --tag snapshot`
await $`git checkout package.json`
}
if (!snapshot) {
await $`bun publish`
}
await $`bun pm version 0.0.0 --no-git-tag-version`

View file

@ -11,12 +11,18 @@ if (!version) {
}
process.env["OPENCODE_VERSION"] = version
await import(`../packages/opencode/script/publish.ts`)
await import(`../packages/sdk/stainless/generate.ts`)
await import(`../packages/sdk/js/script/publish.ts`)
await import(`../packages/opencode/script/publish.ts`)
if (!snapshot) {
await $`git commit -am "Release v${version}"`
await $`git tag v${version}`
await $`git push origin HEAD --tags`
}
if (snapshot) {
await $`git commit --allow-empty -m "Snapshot release v${version}"`
await $`git tag v${version}`
await $`git push origin v${version}`
await $`git reset --soft HEAD~1`
}