mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 05:08:32 +00:00
fix(cli): publish v2 package
This commit is contained in:
parent
e6f660fecf
commit
df9ecb8f6a
2 changed files with 6 additions and 8 deletions
|
|
@ -25,13 +25,14 @@ for (const filepath of new Bun.Glob("*/package.json").scanSync({ cwd: "./dist" }
|
|||
}
|
||||
console.log("binaries", binaries)
|
||||
const version = Object.values(binaries)[0]
|
||||
const name = "opencode-ai"
|
||||
|
||||
await $`mkdir -p ./dist/${pkg.name}/bin`
|
||||
await $`cp ./bin/opencode2.cjs ./dist/${pkg.name}/bin/opencode2`
|
||||
await Bun.file(`./dist/${pkg.name}/package.json`).write(
|
||||
await $`mkdir -p ./dist/${name}/bin`
|
||||
await $`cp ./bin/opencode2.cjs ./dist/${name}/bin/opencode2`
|
||||
await Bun.file(`./dist/${name}/package.json`).write(
|
||||
JSON.stringify(
|
||||
{
|
||||
name: pkg.name,
|
||||
name,
|
||||
bin: { opencode2: "./bin/opencode2" },
|
||||
version,
|
||||
license: pkg.license,
|
||||
|
|
@ -50,4 +51,4 @@ await Promise.all(
|
|||
publish(`./dist/${name.replace("@opencode-ai/", "")}`, name, version),
|
||||
),
|
||||
)
|
||||
await publish(`./dist/${pkg.name}`, pkg.name, version)
|
||||
await publish(`./dist/${name}`, name, version)
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@ if (Script.release && !Script.preview) {
|
|||
await prepareReleaseFiles()
|
||||
|
||||
console.log("\n=== cli ===\n")
|
||||
await $`bun ./packages/opencode/script/publish.ts`
|
||||
|
||||
console.log("\n=== preview cli ===\n")
|
||||
await $`bun ./packages/cli/script/publish.ts`
|
||||
|
||||
console.log("\n=== sdk ===\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue