mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 23:40:48 +00:00
sync
This commit is contained in:
parent
09e7e0ab70
commit
cd79676b42
2 changed files with 6 additions and 3 deletions
|
|
@ -4,10 +4,13 @@ if (process.versions.bun !== "1.3.0") {
|
|||
throw new Error("This script requires bun@1.3.0")
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue