diff options
| author | Dax Raad <[email protected]> | 2025-06-24 14:42:25 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-06-24 14:42:25 -0400 |
| commit | 6ed661c140242289c666dcfe1a484d78c71c1612 (patch) | |
| tree | 6ad90641b3a4dc31e7a41de20318c974fff4dff4 | |
| parent | 9dc00edfc965b682b0f8ad349245c4a61df22663 (diff) | |
| download | opencode-6ed661c140242289c666dcfe1a484d78c71c1612.tar.gz opencode-6ed661c140242289c666dcfe1a484d78c71c1612.zip | |
ci: upgrade bun
| -rw-r--r-- | .github/workflows/deploy.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/publish.yml | 2 | ||||
| -rw-r--r-- | packages/opencode/src/index.ts | 31 |
3 files changed, 18 insertions, 17 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc89914fe..99d96eeb8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: - uses: oven-sh/setup-bun@v1 with: - bun-version: latest + bun-version: 1.2.17 - run: bun install diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 58726815f..7a15729d8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,7 +32,7 @@ jobs: - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.2.16 + bun-version: 1.2.17 - name: Install makepkg run: | diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts index 6546958b2..d5890e8d7 100644 --- a/packages/opencode/src/index.ts +++ b/packages/opencode/src/index.ts @@ -92,21 +92,22 @@ const cli = yargs(hideBin(process.argv)) }, }) - ; (async () => { - if (Installation.VERSION === "dev") return - if (Installation.isSnapshot()) return - const config = await Config.global() - if (config.autoupdate === false) return - const latest = await Installation.latest() - if (Installation.VERSION === latest) return - const method = await Installation.method() - if (method === "unknown") return - await Installation.upgrade(method, latest) - .then(() => { - Bus.publish(Installation.Event.Updated, { version: latest }) - }) - .catch(() => { }) - })() + ;(async () => { + if (Installation.VERSION === "dev") return + if (Installation.isSnapshot()) return + const config = await Config.global() + if (config.autoupdate === false) return + const latest = await Installation.latest().catch(() => {}) + if (!latest) return + if (Installation.VERSION === latest) return + const method = await Installation.method() + if (method === "unknown") return + await Installation.upgrade(method, latest) + .then(() => { + Bus.publish(Installation.Event.Updated, { version: latest }) + }) + .catch(() => {}) + })() await proc.exited server.stop() |
