Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions DIVERGENCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ git checkout -b sync-upstream main
# FROM = current version in packages/opencode/package.json; TO = target release
FROM=v1.17.15 TO=v1.17.16

# Drop the fork's revision suffix first. Upstream's manifests carry the plain
# version at FROM, so while ours read 1.17.15-2 every one of their version hunks
# conflicts (~29 manifests); matching FROM lets them apply clean and land on TO
# by themselves. Skip if the fork is already on the plain value — `bump` refuses
# a no-op. `git add` is required: `git apply --index` rejects unstaged changes
# with "does not match index", and staging folds this into the sync commit.
bun bump ${FROM#v}
git add -A

# `git apply` is atomic: hunks against files the fork deleted (locales, docs
# translations — see the table below) hard-error and roll back the entire patch,
# so filter them out first. A path is skipped only if it existed in FROM and is
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CoDev Code is a fork of [OpenCode](https://github.com/anomalyco/opencode) that t

All workspace packages share one version — the one releases publish — kept in lockstep (`packages/codev-gateway` is fork-only and versions independently). There are only two ways it changes:

- **Upstream sync** — the version comes from upstream; do not bump manually. The sync restores the plain upstream value (e.g. `1.17.18-2` → `1.17.19`).
- **Upstream sync** — the version comes from upstream; never pick one yourself. The sync restores the plain upstream value (e.g. `1.17.18-2` → `1.17.19`). Its [procedure](DIVERGENCES.md#syncing-with-upstream) drops the fork's suffix with the same script on the way, so upstream's version applies cleanly.
- **Fork-only re-release between syncs** — append or increment a numeric revision suffix: `1.17.18` → `1.17.18-1` → `1.17.18-2` (the Nth fork build of that upstream release). Semver sorts the suffixed form below the bare `1.17.18`, but installs follow the `latest` dist-tag, so that quirk is harmless.

For a fork-only bump, run the script — it rewrites every manifest in lockstep, regenerates `bun.lock`, and verifies nothing was missed:
Expand Down
Loading