summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-10-28 20:35:18 -0400
committerDax Raad <[email protected]>2025-10-28 20:35:18 -0400
commitcd79676b42cefad289c21631605c737fbe461f80 (patch)
treee1199cf0ce6b627a13642119c906df87ba501f8c
parent09e7e0ab70e6d3ff36eed0e77aa99610194e9c59 (diff)
downloadopencode-cd79676b42cefad289c21631605c737fbe461f80.tar.gz
opencode-cd79676b42cefad289c21631605c737fbe461f80.zip
sync
-rwxr-xr-xpackages/opencode/script/publish.ts2
-rw-r--r--packages/script/src/index.ts7
2 files changed, 6 insertions, 3 deletions
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts
index a81e7e9e9..833198cb0 100755
--- a/packages/opencode/script/publish.ts
+++ b/packages/opencode/script/publish.ts
@@ -42,7 +42,7 @@ await $`cd ./dist/${pkg.name} && bun publish --access public --tag ${Script.chan
if (!Script.preview) {
const major = Script.version.split(".")[0]
- const majorTag = `v${major}`
+ const majorTag = `latest-${major}`
for (const [name] of Object.entries(binaries)) {
await $`cd dist/${name} && npm dist-tag add ${name}@${Script.version} ${majorTag}`
}
diff --git a/packages/script/src/index.ts b/packages/script/src/index.ts
index d5b2c9e4a..090b7396b 100644
--- a/packages/script/src/index.ts
+++ b/packages/script/src/index.ts
@@ -4,10 +4,13 @@ if (process.versions.bun !== "1.3.0") {
throw new Error("This script requires [email protected]")
}
-const CHANNEL = process.env["OPENCODE_CHANNEL"] ?? (await $`git branch --show-current`.text().then((x) => x.trim()))
+const CHANNEL =
+ process.env["OPENCODE_CHANNEL"] ??
+ (await $`git branch --show-current`.text().then((x) => x.trim()))
const IS_PREVIEW = CHANNEL !== "latest"
const VERSION = await (async () => {
- if (IS_PREVIEW) return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
+ if (IS_PREVIEW)
+ return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
const version = await fetch("https://registry.npmjs.org/opencode-ai/latest")
.then((res) => {
if (!res.ok) throw new Error(res.statusText)