Skip to content

Commit cd79676

Browse files
committed
sync
1 parent 09e7e0a commit cd79676

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/opencode/script/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ await $`cd ./dist/${pkg.name} && bun publish --access public --tag ${Script.chan
4242

4343
if (!Script.preview) {
4444
const major = Script.version.split(".")[0]
45-
const majorTag = `v${major}`
45+
const majorTag = `latest-${major}`
4646
for (const [name] of Object.entries(binaries)) {
4747
await $`cd dist/${name} && npm dist-tag add ${name}@${Script.version} ${majorTag}`
4848
}

packages/script/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ if (process.versions.bun !== "1.3.0") {
44
throw new Error("This script requires [email protected]")
55
}
66

7-
const CHANNEL = process.env["OPENCODE_CHANNEL"] ?? (await $`git branch --show-current`.text().then((x) => x.trim()))
7+
const CHANNEL =
8+
process.env["OPENCODE_CHANNEL"] ??
9+
(await $`git branch --show-current`.text().then((x) => x.trim()))
810
const IS_PREVIEW = CHANNEL !== "latest"
911
const VERSION = await (async () => {
10-
if (IS_PREVIEW) return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
12+
if (IS_PREVIEW)
13+
return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
1114
const version = await fetch("https://registry.npmjs.org/opencode-ai/latest")
1215
.then((res) => {
1316
if (!res.ok) throw new Error(res.statusText)

0 commit comments

Comments
 (0)