|
| 1 | +# Beta Release Channel |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +Introduce a separate **beta build** of Dota Keeper alongside the stable build, so new features can be tested with opt-in users without risking breakage for everyone on the stable track. |
| 6 | + |
| 7 | +## Decision: Separate Build (not a channel toggle) |
| 8 | + |
| 9 | +A **fully separate beta build** is the right approach rather than a runtime setting that switches the update URL. Reasons: |
| 10 | + |
| 11 | +- A bad beta update can't accidentally land on a stable installation. |
| 12 | +- The beta can (and should) use a separate database so beta data doesn't pollute stable saves. |
| 13 | +- It installs side-by-side — you can run both at the same time. |
| 14 | +- CI can publish beta releases independently without touching the stable update manifest. |
| 15 | + |
| 16 | +A "switch update channel in settings" approach is tempting but dangerous: if the beta update itself is broken you can't roll back via the updater. |
| 17 | + |
| 18 | +## What Needs to Change |
| 19 | + |
| 20 | +### 1. Tauri Config (`tauri.conf.json` → new `tauri.beta.conf.json`) |
| 21 | + |
| 22 | +```json |
| 23 | +{ |
| 24 | + "productName": "Dota Keeper Beta", |
| 25 | + "identifier": "com.volthawk.dota-keeper-beta", |
| 26 | + "plugins": { |
| 27 | + "updater": { |
| 28 | + "endpoints": [ |
| 29 | + "https://raw.githubusercontent.com/stringhandler/dota-keeper/main/meta/autoupdate/latest-beta.json" |
| 30 | + ] |
| 31 | + } |
| 32 | + } |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +Key differences vs stable: |
| 37 | +- `productName`: `"Dota Keeper Beta"` — shows "Beta" in title bar and taskbar |
| 38 | +- `identifier`: `com.volthawk.dota-keeper-beta` — separate OS install, separate registry entry |
| 39 | +- `endpoints`: points to `latest-beta.json` instead of `latest.json` |
| 40 | + |
| 41 | +### 2. Database Separation (`database.rs`) |
| 42 | + |
| 43 | +The database name is already `dota_keeper.db` for release and `dota_keeper_dev.db` for dev. Add a third variant for beta: `dota_keeper_beta.db`. |
| 44 | + |
| 45 | +Detect via a compile-time feature flag or a `DOTA_KEEPER_BETA` env var set in the beta build script. |
| 46 | + |
| 47 | +### 3. New Autoupdate Manifest (`meta/autoupdate/latest-beta.json`) |
| 48 | + |
| 49 | +Same structure as `latest.json`. CI populates this on every beta release. |
| 50 | + |
| 51 | +### 4. CI / GitHub Actions |
| 52 | + |
| 53 | +Add a `release-beta.yml` workflow (or a conditional path in the existing `release.yml`) that mirrors the existing `release` branch workflow: |
| 54 | +- Triggers on pushes to the `beta` branch (same pattern as `release` → stable) |
| 55 | +- Builds using `tauri.beta.conf.json` |
| 56 | +- Publishes artifacts as a GitHub **pre-release** |
| 57 | +- Updates `meta/autoupdate/latest-beta.json` and commits/pushes it to `main` |
| 58 | + |
| 59 | +Stable releases continue to trigger on pushes to `release` and update `latest.json`. |
| 60 | + |
| 61 | +### 5. Window Title / Visual Indicator |
| 62 | + |
| 63 | +Add a subtle "BETA" badge in the custom title bar (or window title string) when running the beta build, so it's obvious which version is open. |
| 64 | + |
| 65 | +## Release Flow |
| 66 | + |
| 67 | +``` |
| 68 | +main (dev work) |
| 69 | + │ |
| 70 | + ├─► merge to beta branch |
| 71 | + │ → CI builds beta → GitHub pre-release + latest-beta.json updated |
| 72 | + │ → beta users auto-update |
| 73 | + │ |
| 74 | + └─► (after testing) merge beta → release branch |
| 75 | + → CI builds stable → GitHub release + latest.json updated |
| 76 | + → stable users auto-update |
| 77 | +``` |
| 78 | + |
| 79 | +This mirrors the existing `release` branch pattern — no tags needed, the branch push is the release trigger. |
| 80 | + |
| 81 | +## Out of Scope |
| 82 | + |
| 83 | +- In-app channel switching (too risky, decided against above) |
| 84 | +- Android / iOS beta tracks (separate concern) |
| 85 | +- Crash reporting / telemetry differences between tracks |
0 commit comments