@@ -92,6 +92,28 @@ v1: `~/.config/opencode/plugins/overlay-workspace.js` against `experimental_work |
92 | 92 | 2. **Phase B — fork features.** *(Done — `v2.0.27-neumark.3`: 1, 4, 5a+7, then 2. Tests per v2's per-package `bun test` layout; `fence-breaker.test.ts` and `cgroup.test.ts` ported; feature 2 covered by `session-create-workspace-default.test.ts`.)* |
93 | 93 | 3. **Promote.** *(Done — releases `v2.0.27-neumark.3` → `v2.1.2-neumark.2` were tagged off the `v2` port branch with fc-opencode's resolver pointed at them; on Nov 2 2026, with the deployment transitioned to v2, `main` was moved onto this line and the v1 mirror retired.)* |
94 | 94 |
|
| 95 | +## Build and release process |
| 96 | + |
| 97 | +```sh |
| 98 | +# bun version is pinned by the root package.json packageManager field ([email protected] on v2.2.5) |
| 99 | +bun install |
| 100 | +cd packages/cli |
| 101 | +OPENCODE_VERSION=v<x.y.z>-neumark.N bun script/build.ts --single |
| 102 | +# → dist/cli-linux-x64/{bin/opencode, package.json}; the embedded web app is built and |
| 103 | +# compiled in (asset map + CSP), so UI changes always need a full binary rebuild. |
| 104 | +# On a constrained build host, install the two native packages for the current |
| 105 | +# platform first (bun install @opentui/core@<v> @opencode/pty@<v>, then revert the |
| 106 | +# package.json/bun.lock pin) and pass --skip-install: the bare command fetches |
| 107 | +# every platform's binaries (~3GB) even for a single-target build. |
| 108 | +cd dist/cli-linux-x64/bin && tar -czf /tmp/opencode-linux-x64.tar.gz opencode |
| 109 | +gh release create v<x.y.z>-neumark.N /tmp/opencode-linux-x64.tar.gz \ |
| 110 | + --repo neumark/opencode --target main |
| 111 | +``` |
| 112 | + |
| 113 | +- **Always build with `OPENCODE_VERSION` set** (leading `v` included, e.g. `v2.2.5-neumark.1`): without it the channel resolves from the branch name, and channel-suffixed database naming (`packages/cli/src/database-path.ts`) makes the binary open a fresh database. With it, the channel is `latest` and the standard database is used. |
| 114 | +- Releases are tagged off `main` and published manually (no CI: upstream `publish.yml` is gated on `github.repository == 'anomalyco/opencode'`); x64 asset only (`opencode-linux-x64.tar.gz`, binary at archive root — fc-opencode installs via find). |
| 115 | +- Keep upstream current by rebasing `main` onto the tracked upstream ref: on the v2 line that is the `release: vX.Y.Z (#PR)` commit on upstream `dev` whose tree matches the release tag (the `sync release versions` shape ended around 2.2.0; locate it with `git log upstream/dev --grep='release: v'`). Push with `--force-with-lease`; release tags pin released binaries and are never moved by rebases. |
| 116 | + |
95 | 117 | ## Open risks |
96 | 118 |
|
97 | 119 | - **LSP regression**: no agent-facing diagnostics in v2 as of v2.0.27 — a real capability loss for code-heavy loops. Track upstream; nothing this fork can port onto. |
|