Compare commits

...

1 Commits

Author SHA1 Message Date
Simon Klee 60a8f60d52 fix(opencode): resolve plugin dependency in local builds 2026-06-25 09:37:19 +02:00
5 changed files with 10 additions and 1 deletions
+1
View File
@@ -91,6 +91,7 @@ for (const item of targets) {
OPENCODE_CLI_NAME: `'${binary}'`,
OPENCODE_MODELS_DEV: modelsData,
OPENCODE_CHANNEL: `'${Script.channel}'`,
OPENCODE_LOCAL_BUILD: String(Script.local),
OPENCODE_LIBC: item.os === "linux" ? `'${item.abi ?? "glibc"}'` : "undefined",
// FFF_LIBC selects the fff native lib variant: "musl" or "gnu".
FFF_LIBC: item.os === "linux" ? `'${item.abi ?? "gnu"}'` : "undefined",
+3 -1
View File
@@ -1,8 +1,10 @@
declare global {
const OPENCODE_VERSION: string
const OPENCODE_CHANNEL: string
const OPENCODE_LOCAL_BUILD: boolean
}
export const InstallationVersion = typeof OPENCODE_VERSION === "string" ? OPENCODE_VERSION : "local"
export const InstallationChannel = typeof OPENCODE_CHANNEL === "string" ? OPENCODE_CHANNEL : "local"
export const InstallationLocal = InstallationChannel === "local"
export const InstallationLocal =
(typeof OPENCODE_LOCAL_BUILD === "boolean" && OPENCODE_LOCAL_BUILD) || InstallationChannel === "local"
+1
View File
@@ -22,6 +22,7 @@ await Bun.build({
define: {
OPENCODE_MODELS_DEV: generated.modelsData,
OPENCODE_CHANNEL: `'${Script.channel}'`,
OPENCODE_LOCAL_BUILD: String(Script.local),
},
files: {
"opencode-web-ui.gen.ts": "",
+1
View File
@@ -193,6 +193,7 @@ for (const item of targets) {
OTUI_TREE_SITTER_WORKER_PATH: bunfsRoot + workerRelativePath,
OPENCODE_WORKER_PATH: workerPath,
OPENCODE_CHANNEL: `'${Script.channel}'`,
OPENCODE_LOCAL_BUILD: String(Script.local),
OPENCODE_LIBC: item.os === "linux" ? `'${item.abi ?? "glibc"}'` : "",
...(item.os === "linux" ? { "process.env.OPENTUI_LIBC": JSON.stringify(item.abi ?? "glibc") } : {}),
},
+4
View File
@@ -30,6 +30,7 @@ const CHANNEL = await (async () => {
return await $`git branch --show-current`.text().then((x) => x.trim())
})()
const IS_PREVIEW = CHANNEL !== "latest"
const IS_LOCAL = !env.OPENCODE_BUMP && !env.OPENCODE_VERSION && !env.OPENCODE_RELEASE && !process.env.CI
const VERSION = await (async () => {
if (env.OPENCODE_VERSION) return env.OPENCODE_VERSION
@@ -67,6 +68,9 @@ export const Script = {
get preview() {
return IS_PREVIEW
},
get local() {
return IS_LOCAL
},
get release(): boolean {
return !!env.OPENCODE_RELEASE
},