From cae475df370363443f98b7641999887929a08f2f Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 17 Sep 2026 10:47:47 -0400 Subject: [PATCH] sync --- packages/cli/script/publish-aur.ts | 10 ++++++++-- packages/cli/script/publish.ts | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/cli/script/publish-aur.ts b/packages/cli/script/publish-aur.ts index 6d173ad8044..f18a294aeb3 100644 --- a/packages/cli/script/publish-aur.ts +++ b/packages/cli/script/publish-aur.ts @@ -6,10 +6,16 @@ import path from "node:path" import { fileURLToPath } from "node:url" import { UpdateArtifact } from "../../../script/update-artifact" -if (Script.channel !== "beta") throw new Error("AUR publishing requires the beta channel") +if (Script.channel !== "beta" && Script.channel !== "latest") { + throw new Error("AUR publishing requires the beta or latest channel") +} const name = "opencode-beta" const command = "opencode" -if (!/^\d+\.\d+\.\d+-beta[.-]\d+(?:\.\d+)?$/.test(Script.version)) throw new Error("Expected a beta release version") +const valid = + Script.channel === "beta" + ? /^\d+\.\d+\.\d+-beta[.-]\d+(?:\.\d+)?$/.test(Script.version) + : /^\d+\.\d+\.\d+$/.test(Script.version) +if (!valid) throw new Error(`Expected a ${Script.channel} release version`) const dir = fileURLToPath(new URL("..", import.meta.url)) const root = path.resolve(process.env.OPENCODE_CLI_DIST ?? path.join(dir, "dist")) diff --git a/packages/cli/script/publish.ts b/packages/cli/script/publish.ts index bcb511a2e1f..b16fe642e1b 100755 --- a/packages/cli/script/publish.ts +++ b/packages/cli/script/publish.ts @@ -147,7 +147,7 @@ if (Script.channel === "latest" && Script.release && !dryRun) { await $`docker buildx build --platform linux/amd64,linux/arm64 --tag ghcr.io/anomalyco/opencode:${Script.version} --push .` } -if (Script.channel === "beta" && Script.release) { +if ((Script.channel === "beta" || Script.channel === "latest") && Script.release) { await $`bun ./script/publish-aur.ts ${dryRun ? ["--dry-run"] : []}`.env({ ...process.env, OPENCODE_CLI_DIST: root }) }